Class: Put
- Inherits:
-
Object
- Object
- Put
- Defined in:
- lib/put.rb,
lib/put/version.rb
Defined Under Namespace
Modules: NilExtension
Constant Summary collapse
- First =
new(-1).freeze
- Last =
new(1).freeze
- VERSION =
"0.0.1"
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(value) ⇒ Put
constructor
A new instance of Put.
Constructor Details
#initialize(value) ⇒ Put
Returns a new instance of Put.
12 13 14 |
# File 'lib/put.rb', line 12 def initialize(value) @value = value end |
Class Method Details
.first ⇒ Object
4 5 6 |
# File 'lib/put.rb', line 4 def self.first First end |
.last ⇒ Object
8 9 10 |
# File 'lib/put.rb', line 8 def self.last Last end |
Instance Method Details
#<=>(other) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/put.rb', line 19 def <=>(other) @value <=> if other other.value else 0 end end |