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

#deconstruct, #deconstruct_keys, failure, #failure?, result, success

Constructor Details

#initialize(error) ⇒ Failure

Returns a new instance of Failure.



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

def initialize(error)
  @error = error
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  false
end

#tee(_ = nil) ⇒ Object



44
45
46
# File 'lib/pathway/result.rb', line 44

def tee(_=nil)
  self
end

#then(_ = nil) ⇒ Object



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

def then(_=nil)
  self
end