Class: Qrda::Export::Helper::Population
- Inherits:
-
Object
- Object
- Qrda::Export::Helper::Population
- Defined in:
- lib/qrda-export/helper/aggregate_object_helper.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#observation ⇒ Object
Returns the value of attribute observation.
-
#stratifications ⇒ Object
Returns the value of attribute stratifications.
-
#supplemental_data ⇒ Object
Returns the value of attribute supplemental_data.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #add_stratification(id, value, observation) ⇒ Object
-
#initialize ⇒ Population
constructor
A new instance of Population.
Constructor Details
#initialize ⇒ Population
Returns a new instance of Population.
62 63 64 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 62 def initialize @stratifications = [] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def id @id end |
#observation ⇒ Object
Returns the value of attribute observation.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def observation @observation end |
#stratifications ⇒ Object
Returns the value of attribute stratifications.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def stratifications @stratifications end |
#supplemental_data ⇒ Object
Returns the value of attribute supplemental_data.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def supplemental_data @supplemental_data end |
#type ⇒ Object
Returns the value of attribute type.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
60 61 62 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60 def value @value end |
Instance Method Details
#add_stratification(id, value, observation) ⇒ Object
66 67 68 |
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 66 def add_stratification(id,value,observation) stratifications << Stratification.new(id,value,observation) unless stratifications.find { |st| st.id == id } end |