Class: PageMagic::Comparator::Null

Inherits:
PageMagic::Comparator show all
Defined in:
lib/page_magic/comparator/null.rb

Overview

models mapping used to relate pages to uris

Instance Attribute Summary

Attributes inherited from PageMagic::Comparator

#comparator, #fuzzy

Instance Method Summary collapse

Methods inherited from PageMagic::Comparator

#==, for, #fuzzy?, #to_s

Constructor Details

#initialize(_comparator = nil) ⇒ Null

Returns a new instance of Null.



7
8
9
# File 'lib/page_magic/comparator/null.rb', line 7

def initialize(_comparator = nil)
  super(nil, false)
end

Instance Method Details

#<=>(other) ⇒ Object



15
16
17
18
19
# File 'lib/page_magic/comparator/null.rb', line 15

def <=>(other)
  return 0 if other.is_a?(Null)

  1
end

#match?(_value) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/page_magic/comparator/null.rb', line 11

def match?(_value)
  true
end

#present?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/page_magic/comparator/null.rb', line 21

def present?
  false
end