Class: Mtrc::Sample
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(o) ⇒ Object
-
#initialize(key, value) ⇒ Sample
constructor
A new instance of Sample.
Constructor Details
#initialize(key, value) ⇒ Sample
Returns a new instance of Sample.
16 17 18 19 |
# File 'lib/mtrc/sample.rb', line 16 def initialize(key, value) @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
14 15 16 |
# File 'lib/mtrc/sample.rb', line 14 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
15 16 17 |
# File 'lib/mtrc/sample.rb', line 15 def value @value end |
Instance Method Details
#<=>(o) ⇒ Object
21 22 23 |
# File 'lib/mtrc/sample.rb', line 21 def <=>(o) self.key <=> o.key end |