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.



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

def initialize(error) = @error = error

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


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

def success? = false

#tee(_ = nil) ⇒ Object



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

def tee(_=nil) = self

#then(_ = nil) ⇒ Object



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

def then(_=nil) = self