Module: Logica::ComparableByState
- Included in:
- Predicates::Base
- Defined in:
- lib/logica/comparable_by_state.rb
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
- #state ⇒ Object
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
3 4 5 |
# File 'lib/logica/comparable_by_state.rb', line 3 def ==(other) other.instance_of?(self.class) && other.state == state end |
#hash ⇒ Object
8 9 10 |
# File 'lib/logica/comparable_by_state.rb', line 8 def hash state.hash end |
#state ⇒ Object
12 13 14 |
# File 'lib/logica/comparable_by_state.rb', line 12 def state attributes end |