Exception: Dry::Effects::Halt

Inherits:
StandardError
  • Object
show all
Extended by:
Core::ClassAttributes
Defined in:
lib/dry/effects/halt.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload = Undefined) ⇒ Halt

Returns a new instance of Halt.



21
22
23
24
# File 'lib/dry/effects/halt.rb', line 21

def initialize(payload = Undefined)
  super(EMPTY_STRING)
  @payload = payload
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



19
20
21
# File 'lib/dry/effects/halt.rb', line 19

def payload
  @payload
end

Class Method Details

.[](key) ⇒ Object



12
13
14
15
16
17
# File 'lib/dry/effects/halt.rb', line 12

def self.[](key)
  @constants.fetch_or_store(key) do
    klass = ::Class.new(Halt)
    const_set(Inflector.camelize(key), klass)
  end
end