Class: PageMagic::Comparator
- Defined in:
- lib/page_magic/comparator.rb,
lib/page_magic/comparator/null.rb,
lib/page_magic/comparator/fuzzy.rb,
lib/page_magic/comparator/literal.rb,
lib/page_magic/comparator/parameter_map.rb
Overview
class Comparator - used for comparing components used for mapping pages
Direct Known Subclasses
Defined Under Namespace
Classes: Fuzzy, Literal, Null, ParameterMap
Instance Attribute Summary collapse
-
#comparator ⇒ Object
readonly
Returns the value of attribute comparator.
-
#fuzzy ⇒ Object
readonly
Returns the value of attribute fuzzy.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #fuzzy? ⇒ Boolean
-
#initialize(comparator, fuzzy) ⇒ Comparator
constructor
A new instance of Comparator.
- #to_s ⇒ Object
Constructor Details
#initialize(comparator, fuzzy) ⇒ Comparator
Returns a new instance of Comparator.
20 21 22 23 |
# File 'lib/page_magic/comparator.rb', line 20 def initialize(comparator, fuzzy) @comparator = comparator @fuzzy = fuzzy end |
Instance Attribute Details
#comparator ⇒ Object (readonly)
Returns the value of attribute comparator.
18 19 20 |
# File 'lib/page_magic/comparator.rb', line 18 def comparator @comparator end |
#fuzzy ⇒ Object (readonly)
Returns the value of attribute fuzzy.
18 19 20 |
# File 'lib/page_magic/comparator.rb', line 18 def fuzzy @fuzzy end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
33 34 35 |
# File 'lib/page_magic/comparator.rb', line 33 def ==(other) comparator == other.comparator end |
#fuzzy? ⇒ Boolean
25 26 27 |
# File 'lib/page_magic/comparator.rb', line 25 def fuzzy? fuzzy end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/page_magic/comparator.rb', line 29 def to_s comparator.to_s end |