Class: Opted::Result::Match::ErrMatch
- Inherits:
-
Object
- Object
- Opted::Result::Match::ErrMatch
- 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(error) ⇒ ErrMatch
constructor
A new instance of ErrMatch.
- #ok ⇒ Object
Constructor Details
#initialize(error) ⇒ ErrMatch
Returns a new instance of ErrMatch.
40 41 42 |
# File 'lib/opted/result/match.rb', line 40 def initialize(error) @error = error end |
Instance Attribute Details
#mapped_value_or_error ⇒ Object (readonly)
Returns the value of attribute mapped_value_or_error.
39 40 41 |
# File 'lib/opted/result/match.rb', line 39 def mapped_value_or_error @mapped_value_or_error end |
Instance Method Details
#err ⇒ Object
47 48 49 |
# File 'lib/opted/result/match.rb', line 47 def err @mapped_value_or_error = yield @error end |
#ok ⇒ Object
44 45 |
# File 'lib/opted/result/match.rb', line 44 def ok end |