Class: Seatsio::EventReport
- Inherits:
-
Object
- Object
- Seatsio::EventReport
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(data) ⇒ EventReport
constructor
A new instance of EventReport.
Constructor Details
#initialize(data) ⇒ EventReport
Returns a new instance of EventReport.
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/seatsio/domain.rb', line 396 def initialize(data) if data.is_a? Array items = [] data.each do |item| items << EventObjectInfo.new(item) end @items = items elsif data.nil? @items = [] else items = {} data.each do |key, values| items[key] = [] values.each do |value| items[key] << EventObjectInfo.new(value) end end @items = items end end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
394 395 396 |
# File 'lib/seatsio/domain.rb', line 394 def items @items end |