Class: ActiveHouse::Query
- Inherits:
-
Object
- Object
- ActiveHouse::Query
- Includes:
- Chainable, Collectable, Scopeable
- Defined in:
- lib/active_house/query.rb
Instance Attribute Summary collapse
-
#model_class ⇒ Object
readonly
Returns the value of attribute model_class.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(model_class = ActiveHouse::Model) ⇒ Query
constructor
A new instance of Query.
Methods included from Scopeable
#method_missing, #respond_to_missing?
Methods included from Collectable
#loaded?, #reset, #to_a, #to_hashes
Methods included from Chainable
#chain_defaults, #chain_methods, #dup, #except, #to_query
Methods included from ArrayJoinable
Methods included from Unionable
#except_union, #union, #union_for, #update_union
Methods included from Limitable
Methods included from Havingable
Methods included from Groupable
Methods included from Orderable
Methods included from Whereable
Methods included from Fromable
Methods included from Selectable
Constructor Details
#initialize(model_class = ActiveHouse::Model) ⇒ Query
Returns a new instance of Query.
9 10 11 12 |
# File 'lib/active_house/query.rb', line 9 def initialize(model_class = ActiveHouse::Model) @model_class = model_class super() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveHouse::Scopeable
Instance Attribute Details
#model_class ⇒ Object (readonly)
Returns the value of attribute model_class.
7 8 9 |
# File 'lib/active_house/query.rb', line 7 def model_class @model_class end |
Instance Method Details
#connection ⇒ Object
14 15 16 |
# File 'lib/active_house/query.rb', line 14 def connection model_class.connection end |