vendor/bundle/jruby/2.3.0/gems/public_suffix-1.4.6/lib/public_suffix/rule.rb
# Checks if this rule matches +domain+.
#
# @param [String, #to_s] domain
#   The domain name to check.
#
# @return [Boolean]
#
# @example
#   rule = Rule.factory("com")
#   # #<PublicSuffix::Rule::Normal>
#   rule.match?("example.com")
#   # => true
#   rule.match?("example.net")
#   # => false
#
Checks if this rule matches +domain+.
Checks if this rule matches + domain + .
def match?(domain)
        l1 = labels
        l2 = Domain.domain_to_labels(domain)
        odiff(l1, l2).empty?
      end
def match? ( domain ) l1 = labels l2 = Domain . domain_to_labels ( domain ) odiff ( l1 , l2 ) . empty? end
Checks if this rule matches +domain+.
Checks if this rule matches + domain + .
None
Boolean
domain
<not_specific>
<not_specific>
domain The domain name to check.
domain The domain name to check .
example
rule = Rule.factory("com") # # rule.match?("example.com") # => true rule.match?("example.net") # => false
rule = Rule . factory ( " com " ) # # rule . match? ( " example . com " ) # = > true rule . match? ( " example . net " ) # = > false