Class: XQuery::Generic
Overview
delegates all operations to model
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#method_missing(name, *args, &block) ⇒ Object
all missing methods would be delegated to query and processed as wrappers process them.
-
#respond_to_missing?(name) ⇒ Boolean
respond to all public model methods.
Methods inherited from Abstract
alias_on_q, #apply, #execute, inherited, #initialize, query_proxy, with, #with, wrap_method, wrap_methods
Constructor Details
This class inherits a constructor from XQuery::Abstract
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
all missing methods would be delegated to query and processed as wrappers process them
8 9 10 11 |
# File 'lib/xquery/generic.rb', line 8 def method_missing(name, *args, &block) super unless respond_to_missing?(name) _update_query(name, *args, &block) end |
Instance Method Details
#respond_to_missing?(name) ⇒ Boolean
respond to all public model methods
14 15 16 |
# File 'lib/xquery/generic.rb', line 14 def respond_to_missing?(name, *) query.respond_to?(name, true) end |