Class: Stupidedi::Either
Defined Under Namespace
Classes: Failure, Success
Filtering the Value
collapse
Transforming the Value
collapse
Instance Method Summary
collapse
Class Method Details
.failure(reason) ⇒ Failure
275
276
277
|
# File 'lib/stupidedi/either.rb', line 275
def failure(reason)
Either::Failure.new(reason)
end
|
.success(value) ⇒ Success
270
271
272
|
# File 'lib/stupidedi/either.rb', line 270
def success(value)
Either::Success.new(value)
end
|
Instance Method Details
#defined? ⇒ Boolean
5
|
# File 'lib/stupidedi/either.rb', line 5
abstract :defined?
|
32
|
# File 'lib/stupidedi/either.rb', line 32
abstract :explain, :args => %w(&block)
|
35
|
# File 'lib/stupidedi/either.rb', line 35
abstract :fetch, :args => %w(default)
|
26
|
# File 'lib/stupidedi/either.rb', line 26
abstract :flatmap, :args => %w(&block)
|
23
|
# File 'lib/stupidedi/either.rb', line 23
abstract :map, :args => %w(&block)
|
29
|
# File 'lib/stupidedi/either.rb', line 29
abstract :or, :args => %w(&block)
|
14
|
# File 'lib/stupidedi/either.rb', line 14
abstract :reject, :args => %w(reason='reject' &block)
|
11
|
# File 'lib/stupidedi/either.rb', line 11
abstract :select, :args => %w(reason='select' &block)
|