Class: PageMagic::Comparator::Null
- Inherits:
-
PageMagic::Comparator
- Object
- PageMagic::Comparator
- PageMagic::Comparator::Null
- 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
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(_comparator = nil) ⇒ Null
constructor
A new instance of Null.
- #match?(_value) ⇒ Boolean
- #present? ⇒ Boolean
Methods inherited from PageMagic::Comparator
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
11 12 13 |
# File 'lib/page_magic/comparator/null.rb', line 11 def match?(_value) true end |
#present? ⇒ Boolean
21 22 23 |
# File 'lib/page_magic/comparator/null.rb', line 21 def present? false end |