Module: Injection::ClassInject::Initialize
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/injection/class_inject.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#initialize(*args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/injection/class_inject.rb', line 8 def initialize(*args) if args.empty? raise 'No context file loaded' if Injection.context.is_a?(Hash) constructor_args = self.class.constructor_keys.inject({}) do |memo, key| memo[key] = Injection.context[key] memo end super(constructor_args) else super end end |