Module: Integrative::Integrator

Extended by:
ActiveSupport::Concern
Defined in:
lib/integrative/integrator.rb

Instance Method Summary collapse

Instance Method Details

#integrative_dynamic_method_call(name, integration) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/integrative/integrator.rb', line 5

def integrative_dynamic_method_call(name, integration)
  ivar = "@#{name}"
  if instance_variable_defined? ivar
    instance_variable_get ivar
  else
    Rails.logger.info "Integrations fetched for a single #{self.class.name} record."
    integration.integrated_class.integrative_find_and_assign([self], integration)
    instance_variable_get ivar
  end
end