Class: Opted::Result::Match::OkMatch
- Inherits:
-
Object
- Object
- Opted::Result::Match::OkMatch
- Defined in:
- lib/opted/result/match.rb
Instance Attribute Summary collapse
-
#mapped_value_or_error ⇒ Object
readonly
Returns the value of attribute mapped_value_or_error.
Instance Method Summary collapse
- #err ⇒ Object
-
#initialize(value) ⇒ OkMatch
constructor
A new instance of OkMatch.
- #ok ⇒ Object
Constructor Details
#initialize(value) ⇒ OkMatch
Returns a new instance of OkMatch.
26 27 28 |
# File 'lib/opted/result/match.rb', line 26 def initialize(value) @value = value end |
Instance Attribute Details
#mapped_value_or_error ⇒ Object (readonly)
Returns the value of attribute mapped_value_or_error.
25 26 27 |
# File 'lib/opted/result/match.rb', line 25 def mapped_value_or_error @mapped_value_or_error end |
Instance Method Details
#err ⇒ Object
34 35 |
# File 'lib/opted/result/match.rb', line 34 def err end |
#ok ⇒ Object
30 31 32 |
# File 'lib/opted/result/match.rb', line 30 def ok @mapped_value_or_error = yield @value end |