Class: RFunk::Failure

Inherits:
Either
  • Object
show all
Defined in:
lib/rfunk/either/failure.rb

Instance Method Summary collapse

Methods inherited from Either

#==, #initialize, #result

Constructor Details

This class inherits a constructor from RFunk::Either

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)

7
8
9
# File 'lib/rfunk/either/failure.rb', line 7

def failure?
  true
end

#keyObject


15
16
17
# File 'lib/rfunk/either/failure.rb', line 15

def key
  :failure
end

#or(value) ⇒ Object


11
12
13
# File 'lib/rfunk/either/failure.rb', line 11

def or(value)
  RFunk.failure(value)
end

#success?Boolean

Returns:

  • (Boolean)

3
4
5
# File 'lib/rfunk/either/failure.rb', line 3

def success?
  false
end