Class: Crawlberg::HostMatcherExact

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

Overview

Exact hostname match (case-insensitive).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



606
607
608
# File 'lib/crawlberg/native.rb', line 606

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



623
624
625
# File 'lib/crawlberg/native.rb', line 623

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

Instance Method Details

#cidr?Boolean

Returns:

  • (Boolean)


619
620
621
# File 'lib/crawlberg/native.rb', line 619

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

#exact?Boolean

Returns:

  • (Boolean)


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

def exact? = true

#suffix?Boolean

Returns:

  • (Boolean)


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

def suffix? = false