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, inherited, #initialize, query_proxy, 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
11 12 13 14 |
# File 'lib/xquery/generic.rb', line 11 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
17 18 19 |
# File 'lib/xquery/generic.rb', line 17 def respond_to_missing?(name, *) query.respond_to?(name, true) end |