Module: Option::None
- Includes:
- Contracts::Core, Trither::BasicTypes
- Defined in:
- lib/trither/option.rb,
lib/trither/option.rb
Constant Summary
Trither::BasicTypes::C, Trither::BasicTypes::Func0, Trither::BasicTypes::Func1, Trither::BasicTypes::Predicate
Class Method Summary
collapse
Class Method Details
.empty? ⇒ Boolean
51
52
53
|
# File 'lib/trither/option.rb', line 51
def self.empty?
true
end
|
.fetch(default) ⇒ Object
61
62
63
|
# File 'lib/trither/option.rb', line 61
def self.fetch(default)
default
end
|
.filter ⇒ Object
56
57
58
|
# File 'lib/trither/option.rb', line 56
def self.filter
self
end
|
.flat_map ⇒ Object
71
72
73
|
# File 'lib/trither/option.rb', line 71
def self.flat_map
self
end
|
.get_or_else ⇒ Object
81
82
83
|
# File 'lib/trither/option.rb', line 81
def self.get_or_else
yield
end
|
.map ⇒ Object
66
67
68
|
# File 'lib/trither/option.rb', line 66
def self.map
self
end
|
.or_else ⇒ Object
76
77
78
|
# File 'lib/trither/option.rb', line 76
def self.or_else
yield
end
|