Class: Qrda::Export::Helper::PopulationGroup
- Inherits:
-
Object
- Object
- Qrda::Export::Helper::PopulationGroup
- Includes:
- PopulationSelectors
- Defined in:
- lib/qrda-export/helper/aggregate_object_helper.rb
Instance Attribute Summary collapse
-
#populations ⇒ Object
Returns the value of attribute populations.
Instance Method Summary collapse
Methods included from PopulationSelectors
#denominator, #denominator_exceptions, #denominator_exclusions, #method_missing, #multiple_population_types?, #numerator, #population_count, #population_id, #respond_to_missing?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Qrda::Export::Helper::PopulationSelectors
Instance Attribute Details
#populations ⇒ Object
Returns the value of attribute populations.
84 85 86 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 84 def populations @populations end |
Instance Method Details
#is_cv? ⇒ Boolean
93 94 95 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 93 def is_cv? populations.any? { |pop| pop.type == 'MSRPOPL' } end |
#performance_rate ⇒ Object
85 86 87 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 85 def performance_rate numerator_count.to_f / (performance_rate_denominator) end |
#performance_rate_denominator ⇒ Object
89 90 91 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 89 def performance_rate_denominator denominator_count - denominator_exclusions_count - denominator_exceptions_count end |