Module: Dynamord::Chain::ClassMethods
- Defined in:
- lib/generators/templates/dynamord_chain.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *params, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/templates/dynamord_chain.rb', line 10 def method_missing(method_name,*params,&block) if block.present? block = ",&#{block}" else block = "" end params = nil if not params.present? class_name = self.source q = self.query class_name.send(method_name,q.merge(params[0])) end |