Sha256: 8de4cbb12b75198fb296f668aab2ef0e0aa58369285439bb72c48065ac9de8ad

Contents?: true

Size: 632 Bytes

Versions: 2

Compression:

Stored size: 632 Bytes

Contents

module CohortAnalysis
  module ArelSelectManagerInstanceMethods
    # @return [Arel::SelectManager]
    def cohort(characteristics, options = {})
      where Strategy.create(self, characteristics, options)
    end

    # If a cohort has been constructed using this Arel::SelectManager, then this will tell you whether it was successful (posssible) or not.
    # @return [true,false,nil]
    def cohort_possible?
      @cohort_possible_query
    end

    # @private
    def cohort_possible!
      @cohort_possible_query = true
    end

    # @private
    def cohort_impossible!
      @cohort_possible_query = false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cohort_analysis-1.0.3 lib/cohort_analysis/arel_select_manager_instance_methods.rb
cohort_analysis-1.0.2 lib/cohort_analysis/arel_select_manager_instance_methods.rb