Exception: Linearly::Errors::StateNotReturned

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/linearly/errors/state_not_returned.rb

Overview

StateNotReturned is an error that is getting thrown when one of Steps in the Flow does not return an instance of Statefully::State.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ StateNotReturned

Constructor for the Linearly::Errors::StateNotReturned class

Examples:

Linearly::Errors::StateNotReturned.new('surprise')

Parameters:

  • value (Object)


23
24
25
26
# File 'lib/linearly/errors/state_not_returned.rb', line 23

def initialize(value)
  super("#{value.class.name} is not a Statefully::State")
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Value that caused the error

Examples:

Linearly::Errors::StateNotReturned.new('surprise').value
=> "surprise"

Returns:

  • (Object)


14
15
16
# File 'lib/linearly/errors/state_not_returned.rb', line 14

def value
  @value
end