Class: Literal::Result Abstract
Overview
This class is abstract.
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #call {|switch| ... } ⇒ Object
- #deconstruct ⇒ Array
-
#initialize(value) ⇒ Result
constructor
A new instance of Result.
Methods inherited from Monad
Constructor Details
#initialize(value) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/literal/result.rb', line 5 def initialize(value) @value = value freeze end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
10 11 12 |
# File 'lib/literal/result.rb', line 10 def value @value end |