Class: Pathway::Result::Failure

Inherits:
Pathway::Result show all
Defined in:
lib/pathway/result.rb

Instance Attribute Summary

Attributes inherited from Pathway::Result

#error, #value

Instance Method Summary collapse

Methods inherited from Pathway::Result

failure, #failure?, result, success

Constructor Details

#initialize(error) ⇒ Failure

Returns a new instance of Failure.



28
29
30
# File 'lib/pathway/result.rb', line 28

def initialize(error)
  @error = error
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/pathway/result.rb', line 32

def success?
  false
end

#tee(_ = nil) ⇒ Object



40
41
42
# File 'lib/pathway/result.rb', line 40

def tee(_=nil)
  self
end

#then(_ = nil) ⇒ Object



36
37
38
# File 'lib/pathway/result.rb', line 36

def then(_=nil)
  self
end