Class: PublicSuffix::Domain
- Inherits:
-
Object
- Object
- PublicSuffix::Domain
- Defined in:
- lib/cms_scanner/public_suffix/domain.rb
Overview
Monkey Patch to include the match logic
Instance Method Summary collapse
-
#==(other) ⇒ Object
For Sanity.
- #match(pattern) ⇒ Boolean
Instance Method Details
#==(other) ⇒ Object
For Sanity
7 8 9 |
# File 'lib/cms_scanner/public_suffix/domain.rb', line 7 def ==(other) name == other.name end |
#match(pattern) ⇒ Boolean
13 14 15 16 17 18 19 20 |
# File 'lib/cms_scanner/public_suffix/domain.rb', line 13 def match(pattern) pattern = PublicSuffix.parse(pattern) unless pattern.is_a?(PublicSuffix::Domain) return name == pattern.name unless pattern.trd return false unless tld == pattern.tld && sld == pattern.sld matching_pattern?(pattern) end |