Class: Qrda::Export::Helper::Population

Inherits:
Object
  • Object
show all
Defined in:
lib/qrda-export/helper/aggregate_object_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePopulation

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

#idObject

Returns the value of attribute id.



60
61
62
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60

def id
  @id
end

#observationObject

Returns the value of attribute observation.



60
61
62
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60

def observation
  @observation
end

#stratificationsObject

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_dataObject

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

#typeObject

Returns the value of attribute type.



60
61
62
# File 'lib/qrda-export/helper/aggregate_object_helper.rb', line 60

def type
  @type
end

#valueObject

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