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



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

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



299
300
301
# File 'lib/crawlberg/native.rb', line 299

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

Instance Method Details

#cidr?Boolean

Returns:

  • (Boolean)


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

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

#exact?Boolean

Returns:

  • (Boolean)


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

def exact? = false

#suffix?Boolean

Returns:

  • (Boolean)


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

def suffix? = true