Class: RFunk::Value
- Inherits:
-
Object
- Object
- RFunk::Value
- Defined in:
- lib/rfunk/value.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(value) ⇒ Value
constructor
A new instance of Value.
- #result ⇒ Object
Constructor Details
#initialize(value) ⇒ Value
3 4 5 |
# File 'lib/rfunk/value.rb', line 3 def initialize(value) @value = value end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 |
# File 'lib/rfunk/value.rb', line 16 def ==(other) other.result == result end |
#result ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rfunk/value.rb', line 7 def result case value when Some, None value else Option(value) end end |