Class: Casino::Intersection::Match::Equivalence
- Inherits:
-
Object
- Object
- Casino::Intersection::Match::Equivalence
- Defined in:
- lib/casino/intersection/match/equivalence.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#field ⇒ Object
Returns the value of attribute field.
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #eligible? ⇒ Boolean
- #evaluate ⇒ Object
-
#initialize(key, value, document, field) ⇒ Equivalence
constructor
A new instance of Equivalence.
Constructor Details
#initialize(key, value, document, field) ⇒ Equivalence
Returns a new instance of Equivalence.
7 8 9 10 11 12 |
# File 'lib/casino/intersection/match/equivalence.rb', line 7 def initialize(key, value, document, field) self.key = key self.document = document self.field = field self.value = value end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
5 6 7 |
# File 'lib/casino/intersection/match/equivalence.rb', line 5 def document @document end |
#field ⇒ Object
Returns the value of attribute field.
5 6 7 |
# File 'lib/casino/intersection/match/equivalence.rb', line 5 def field @field end |
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/casino/intersection/match/equivalence.rb', line 5 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/casino/intersection/match/equivalence.rb', line 5 def value @value end |
Instance Method Details
#eligible? ⇒ Boolean
14 15 16 |
# File 'lib/casino/intersection/match/equivalence.rb', line 14 def eligible? true end |
#evaluate ⇒ Object
18 19 20 |
# File 'lib/casino/intersection/match/equivalence.rb', line 18 def evaluate value == field end |