Class: Dumbstats::Value
- Inherits:
-
Struct
- Object
- Struct
- Dumbstats::Value
- Includes:
- Comparable
- Defined in:
- lib/dumbstats/value.rb
Overview
A value that associates a numeric value with an aribitrary object.
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
-
#value ⇒ Object
(also: #to_numeric)
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object
3 4 5 |
# File 'lib/dumbstats/value.rb', line 3 def object @object end |
#value ⇒ Object Also known as: to_numeric
Returns the value of attribute value
3 4 5 |
# File 'lib/dumbstats/value.rb', line 3 def value @value end |
Instance Method Details
#<=>(x) ⇒ Object
5 6 7 |
# File 'lib/dumbstats/value.rb', line 5 def <=> x value <=> x.value end |