Class: Crawlberg::HostMatcherSuffix

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
HostMatcher
Defined in:
lib/crawlberg/native.rb

Overview

Suffix match: ".xberg.io" matches "api.xberg.io" and "xberg.io".

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



628
629
630
# File 'lib/crawlberg/native.rb', line 628

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



645
646
647
# File 'lib/crawlberg/native.rb', line 645

def self.from_hash(hash)
  new(value: hash[:value] || hash["value"])
end

Instance Method Details

#cidr?Boolean

Returns:

  • (Boolean)


641
642
643
# File 'lib/crawlberg/native.rb', line 641

def cidr? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#exact?Boolean

Returns:

  • (Boolean)


637
# File 'lib/crawlberg/native.rb', line 637

def exact? = false

#suffix?Boolean

Returns:

  • (Boolean)


639
# File 'lib/crawlberg/native.rb', line 639

def suffix? = true