Class: Stupidedi::Either
- Inherits:
-
Object
show all
- Defined in:
- lib/stupidedi/either.rb
Defined Under Namespace
Classes: Failure, Success
Filtering the Value
collapse
Transforming the Value
collapse
Instance Method Summary
collapse
Class Method Details
.failure(reason) ⇒ Failure
277
278
279
|
# File 'lib/stupidedi/either.rb', line 277
def failure(reason)
Either::Failure.new(reason)
end
|
.success(value) ⇒ Success
272
273
274
|
# File 'lib/stupidedi/either.rb', line 272
def success(value)
Either::Success.new(value)
end
|
Instance Method Details
#defined? ⇒ Boolean
7
|
# File 'lib/stupidedi/either.rb', line 7
abstract :defined?
|
34
|
# File 'lib/stupidedi/either.rb', line 34
abstract :explain, :args => %w(&block)
|
#fetch ⇒ Object
37
|
# File 'lib/stupidedi/either.rb', line 37
abstract :fetch, :args => %w(default)
|
28
|
# File 'lib/stupidedi/either.rb', line 28
abstract :flatmap, :args => %w(&block)
|
25
|
# File 'lib/stupidedi/either.rb', line 25
abstract :map, :args => %w(&block)
|
31
|
# File 'lib/stupidedi/either.rb', line 31
abstract :or, :args => %w(&block)
|
16
|
# File 'lib/stupidedi/either.rb', line 16
abstract :reject, :args => %w(reason='reject' &block)
|
13
|
# File 'lib/stupidedi/either.rb', line 13
abstract :select, :args => %w(reason='select' &block)
|