Method: AMEE::Profile::Item#initialize
- Defined in:
- lib/amee/profile_item.rb
#initialize(data = {}) ⇒ Item
Returns a new instance of Item.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/amee/profile_item.rb', line 8 def initialize(data = {}) @values = data ? data[:values] : [] @total_amount = data[:total_amount] @total_amount_unit = data[:total_amount_unit] @amounts = data[:amounts] || [] @notes = data[:notes] || [] @start_date = data[:start_date] || data[:valid_from] @end_date = data[:end_date] || (data[:end] == true ? @start_date : nil ) @data_item_uid = data[:data_item_uid] super end |