Module: Fear::RightBiased::Left

Includes:
Utils
Included in:
Failure, Left
Defined in:
lib/fear/right_biased.rb

Constant Summary

Constants included from Utils

Utils::UNDEFINED

Instance Method Summary collapse

Methods included from Utils

assert_arg_or_block!, assert_type!, return_or_call_proc, with_block_or_argument

Instance Method Details

#any?false

Returns:

  • (false)

170
171
172
# File 'lib/fear/right_biased.rb', line 170

def any?
  false
end

#eachRightBiased::Left

Ignores the given side-effecting block and return self.

Returns:


144
145
146
# File 'lib/fear/right_biased.rb', line 144

def each
  self
end

#flat_mapRightBiased::Left

Ignores the given block and return self.

Returns:


160
161
162
# File 'lib/fear/right_biased.rb', line 160

def flat_map
  self
end

#get_or_else(&alternative) ⇒ RightBiased

Returns result of evaluating a block.

Returns:


122
123
124
# File 'lib/fear/right_biased.rb', line 122

def get_or_else(*args)
  args.fetch(0) { yield }
end

#include?(_value) ⇒ false

Parameters:

  • (any)

Returns:

  • (false)

136
137
138
# File 'lib/fear/right_biased.rb', line 136

def include?(_value)
  false
end

#mapRightBiased::Left

Ignores the given block and return self.

Returns:


152
153
154
# File 'lib/fear/right_biased.rb', line 152

def map
  self
end

#or_else(*_args) ⇒ Object


129
130
131
# File 'lib/fear/right_biased.rb', line 129

def or_else(*_args)
  yield
end

#to_optionNone

Returns:


165
166
167
# File 'lib/fear/right_biased.rb', line 165

def to_option
  None
end