Class: PassiveRecord::Core::HasManyThroughQuery
- Defined in:
- lib/passive_record/core/query.rb
Instance Attribute Summary
Attributes inherited from Query
Instance Method Summary collapse
-
#initialize(klass, instance, target_name_sym, conditions = {}) ⇒ HasManyThroughQuery
constructor
A new instance of HasManyThroughQuery.
- #raw_all ⇒ Object
Methods inherited from Query
#all, #and, #basic?, #conjoined?, #create, #disjoined?, #each, #evaluate_condition, #evaluate_nested_conditions, #first_or_create, #matching_instances, #method_missing, #negated?, #not, #or, #where
Methods included from ArithmeticHelpers
Constructor Details
#initialize(klass, instance, target_name_sym, conditions = {}) ⇒ HasManyThroughQuery
Returns a new instance of HasManyThroughQuery.
191 192 193 194 195 196 |
# File 'lib/passive_record/core/query.rb', line 191 def initialize(klass, instance, target_name_sym, conditions={}) @klass = klass @instance = instance @target_name_sym = target_name_sym @conditions = conditions end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PassiveRecord::Core::Query
Instance Method Details
#raw_all ⇒ Object
198 199 200 |
# File 'lib/passive_record/core/query.rb', line 198 def raw_all @instance.send(@target_name_sym).all end |