Class: Trailblazer::Context::IndifferentAccess

Inherits:
Trailblazer::Context show all
Includes:
Aliasing, InstanceMethods
Defined in:
lib/trailblazer/context/indifferent_access.rb

Defined Under Namespace

Modules: InstanceMethods

Constant Summary

Constants inherited from Trailblazer::Context

VERSION

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Aliasing

#[], #initialize, #merge, #to_hash

Methods included from InstanceMethods

#[]

Methods inherited from Trailblazer::Context

#[], #[]=, #decompose, for, for_circuit, implementation, #initialize, #keys, #merge, #to_hash

Class Method Details

.build(wrapped_options, mutable_options, _ctx, flow_options) ⇒ Object

This also builds IndifferentAccess::Aliasing. The #build method is designed to take all args from Trailblazer::Context.for_circuit and then translate that to the constructor.



32
33
34
# File 'lib/trailblazer/context/indifferent_access.rb', line 32

def build(wrapped_options, mutable_options, (_ctx, flow_options), **)
  new(wrapped_options, mutable_options, **flow_options)
end

Instance Method Details

#key?(name) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/trailblazer/context/indifferent_access.rb', line 21

def key?(name)
  super(name.to_sym) || super(name.to_s)
end