Class: Opted::Result::Match::OkMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/opted/result/match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_errorObject (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

#errObject



34
35
# File 'lib/opted/result/match.rb', line 34

def err
end

#okObject



30
31
32
# File 'lib/opted/result/match.rb', line 30

def ok
  @mapped_value_or_error = yield @value
end