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



284
285
286
# File 'lib/crawlberg/native.rb', line 284

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



301
302
303
# File 'lib/crawlberg/native.rb', line 301

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

Instance Method Details

#cidr?Boolean

Returns:

  • (Boolean)


297
298
299
# File 'lib/crawlberg/native.rb', line 297

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

#exact?Boolean

Returns:

  • (Boolean)


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

def exact? = true

#suffix?Boolean

Returns:

  • (Boolean)


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

def suffix? = false