Class: Observance::Observation
- Inherits:
-
Struct
- Object
- Struct
- Observance::Observation
- Includes:
- Comparable
- Defined in:
- lib/observance.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#object ⇒ Object
Returns the value of attribute object.
-
#rating ⇒ Object
Returns the value of attribute rating.
Instance Method Summary collapse
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index
5 6 7 |
# File 'lib/observance.rb', line 5 def index @index end |
#object ⇒ Object
Returns the value of attribute object
5 6 7 |
# File 'lib/observance.rb', line 5 def object @object end |
#rating ⇒ Object
Returns the value of attribute rating
5 6 7 |
# File 'lib/observance.rb', line 5 def @rating end |
Instance Method Details
#<=>(other) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/observance.rb', line 8 def <=>(other) return nil unless other.is_a? self.class if other. == self. self.index <=> other.index else other. <=> self. end end |