Module: Option::None

Includes:
Contracts::Core, Trither::BasicTypes
Defined in:
lib/trither/option.rb,
lib/trither/option.rb

Constant Summary

Constants included from Trither::BasicTypes

Trither::BasicTypes::C, Trither::BasicTypes::Func0, Trither::BasicTypes::Func1, Trither::BasicTypes::Predicate

Class Method Summary collapse

Class Method Details

.empty?Boolean

Returns:

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

.filterObject



56
57
58
# File 'lib/trither/option.rb', line 56

def self.filter
  self
end

.flat_mapObject



71
72
73
# File 'lib/trither/option.rb', line 71

def self.flat_map
  self
end

.get_or_elseObject



81
82
83
# File 'lib/trither/option.rb', line 81

def self.get_or_else
  yield
end

.mapObject



66
67
68
# File 'lib/trither/option.rb', line 66

def self.map
  self
end

.or_elseObject



76
77
78
# File 'lib/trither/option.rb', line 76

def self.or_else
  yield
end