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.



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

def initialize(error) = @error = error

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


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

def success? = false

#tee(_ = nil) ⇒ Object



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

def tee(_ = nil) = self

#then(_ = nil) ⇒ Object



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

def then(_ = nil) = self