Method: AMEE::Data::Item#initialize

Defined in:
lib/amee/data_item.rb

#initialize(data = {}) ⇒ Item

Returns a new instance of Item.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/amee/data_item.rb', line 10

def initialize(data = {})
  @values = data[:values]
  @choices = data[:choices]
  @label = data[:label]
  @item_definition_uid = data[:item_definition]
  @total_amount = data[:total_amount]
  @total_amount_unit = data[:total_amount_unit]
  @amounts = data[:amounts] || []
  @notes = data[:notes] || []
  @start_date = data[:start_date]
  @category_uid = data[:category_uid]
  super
end