Class: UState::Query::Equals
- Inherits:
-
Object
- Object
- UState::Query::Equals
- Defined in:
- lib/ustate/query/equals.rb
Instance Method Summary collapse
- #===(state) ⇒ Object
-
#initialize(field, value) ⇒ Equals
constructor
A new instance of Equals.
Constructor Details
#initialize(field, value) ⇒ Equals
Returns a new instance of Equals.
3 4 5 6 |
# File 'lib/ustate/query/equals.rb', line 3 def initialize(field, value) @field = field @value = value end |
Instance Method Details
#===(state) ⇒ Object
8 9 10 |
# File 'lib/ustate/query/equals.rb', line 8 def ===(state) state.send(@field) == @value end |