Class: CohortScope::Cohort

Inherits:
Arel::Nodes::Node
  • Object
show all
Defined in:
lib/cohort_scope/cohort.rb

Direct Known Subclasses

BigCohort, StrictCohort

Constant Summary collapse

IMPOSSIBLE =
'1 = 2'

Instance Method Summary collapse

Constructor Details

#initialize(active_record, characteristics, minimum_cohort_size) ⇒ Cohort

Returns a new instance of Cohort.



5
6
7
8
9
# File 'lib/cohort_scope/cohort.rb', line 5

def initialize(active_record, characteristics, minimum_cohort_size)
  @active_record = active_record
  @characteristics = characteristics
  @minimum_cohort_size = minimum_cohort_size
end

Instance Method Details

#exprObject Also known as: to_sql



11
12
13
# File 'lib/cohort_scope/cohort.rb', line 11

def expr
  @expr ||= resolve
end