class Option::Some
Public Instance Methods
empty?()
click to toggle source
# File lib/trither/option.rb, line 90 def empty? false end
fetch(_default)
click to toggle source
# File lib/trither/option.rb, line 100 def fetch(_default) @value end
filter() { |value| ... }
click to toggle source
# File lib/trither/option.rb, line 95 def filter yield(@value) ? self : None end
flat_map() { |value| ... }
click to toggle source
# File lib/trither/option.rb, line 110 def flat_map result = yield @value if result.nil? None else result end end
get_or_else()
click to toggle source
# File lib/trither/option.rb, line 125 def get_or_else @value end
map() { |value)| ... }
click to toggle source
# File lib/trither/option.rb, line 105 def map Option.make(yield @value) end
or_else()
click to toggle source
# File lib/trither/option.rb, line 120 def or_else self end