Method: ActiveHashRelation::Aggregation#initialize
- Defined in:
- lib/active_hash_relation/aggregation.rb
#initialize(resource, params, model: nil) ⇒ Aggregation
Returns a new instance of Aggregation.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_hash_relation/aggregation.rb', line 7 def initialize(resource, params, model: nil) @configuration = Module.nesting.last.configuration @resource = resource @params = HashWithIndifferentAccess.new(params) @model = model unless @model @model = model_class_name(@resource) end end |