Module: ActiveRecordComposition::ClassMethods

Defined in:
lib/active_record_composition.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/active_record_composition.rb', line 24

def method_missing(method, *args, &block)
  #begin
    active_composite.send method, *args, &block
  #rescue
    #super.method_missing method, *args, &block
  #end
end

Instance Method Details

#active_compositeObject



20
21
22
# File 'lib/active_record_composition.rb', line 20

def active_composite
  @active_composite
end

#active_composite=(active_composite) ⇒ Object



16
17
18
# File 'lib/active_record_composition.rb', line 16

def active_composite=(active_composite)
  @active_composite = active_composite
end