Class: Cubicle::Aggregation::AdHoc

Inherits:
Object
  • Object
show all
Includes:
Cubicle::Aggregation
Defined in:
lib/cubicle/aggregation/ad_hoc.rb

Instance Method Summary collapse

Methods included from Cubicle::Aggregation

#aggregations, #aggregator, #dimension_names, #execute_query, #expire!, #find_member, #process, #query, #transient!, #transient?

Methods included from Dsl

#aggregation, #average, #average_duration, #bucketize, #count, #define, #difference, #dimension, #dimensions, #duration, #duration_since, #durations_in, #expand, #expansions, #filter, #measure, #measures, #named_expressions, #ratio, #source_collection_name, #sum, #target_collection_name, #time_dimension, #total_duration

Constructor Details

#initialize(source_collection, &block) ⇒ AdHoc

Returns a new instance of AdHoc.



5
6
7
8
9
# File 'lib/cubicle/aggregation/ad_hoc.rb', line 5

def initialize(source_collection,&block)
  transient!
  source_collection_name source_collection
  instance_eval(&block) if block_given?
end