diff --git a/lib/public_suffix/domain.rb b/lib/public_suffix/domain.rb index 7f8c1450..efbc5427 100644 --- a/lib/public_suffix/domain.rb +++ b/lib/public_suffix/domain.rb @@ -90,7 +90,7 @@ def to_s # # => [nil, "google", "com"] # def to_a - [trd, sld, tld] + [@trd, @sld, @tld] end # Returns the full domain name. @@ -106,7 +106,7 @@ def to_a # # => "www.google.com" # def name - [trd, sld, tld].reject { |part| part.nil? }.join(".") + [@trd, @sld, @tld].reject { |part| part.nil? }.join(".") end # Returns a domain-like representation of this object @@ -144,7 +144,7 @@ def name # def domain return unless domain? - [sld, tld].join(".") + [@sld, @tld].join(".") end # Returns a domain-like representation of this object @@ -182,7 +182,7 @@ def domain # def subdomain return unless subdomain? - [trd, sld, tld].join(".") + [@trd, @sld, @tld].join(".") end # Returns the rule matching this domain @@ -225,7 +225,7 @@ def rule # @see #subdomain? # def domain? - !(tld.nil? || sld.nil?) + !(@tld.nil? || @sld.nil?) end # Checks whether self looks like a subdomain. @@ -257,7 +257,7 @@ def domain? # @see #domain? # def subdomain? - !(tld.nil? || sld.nil? || trd.nil?) + !(@tld.nil? || @sld.nil? || @trd.nil?) end # Checks whether self is exclusively a domain,