Module: MultipleTableInheritance::Child::Base::DelegateMethods
- Defined in:
- lib/multiple_table_inheritance/child/base.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
165
166
167
168
169
170
171
|
# File 'lib/multiple_table_inheritance/child/base.rb', line 165
def method_missing(name, *args, &block)
if parent_association.respond_to?(name)
parent_association.send(name, *args, &block)
else
super(name, *args, &block)
end
end
|
Instance Method Details
#respond_to?(name, *args) ⇒ Boolean
173
174
175
176
|
# File 'lib/multiple_table_inheritance/child/base.rb', line 173
def respond_to?(name, *args)
return true if name.to_sym == :parent_association
super(name, *args) || parent_association.respond_to?(name)
end
|