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.



26
27
28
# File 'lib/pathway/result.rb', line 26

def initialize(error)
  @error = error
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/pathway/result.rb', line 30

def success?
  false
end

#tee(_ = nil) ⇒ Object



38
39
40
# File 'lib/pathway/result.rb', line 38

def tee(_=nil)
  self
end

#then(_ = nil) ⇒ Object



34
35
36
# File 'lib/pathway/result.rb', line 34

def then(_=nil)
  self
end