Class: TicketflyPlus::Responses::Events
- Defined in:
- lib/ticketfly_plus/responses.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#org ⇒ Object
Returns the value of attribute org.
Attributes inherited from Base
#link, #maxResults, #pageNum, #status, #title, #totalPages, #totalResults
Instance Method Summary collapse
- #get_events(events) ⇒ Object
-
#initialize(response) ⇒ Events
constructor
A new instance of Events.
Constructor Details
#initialize(response) ⇒ Events
Returns a new instance of Events.
36 37 38 39 40 |
# File 'lib/ticketfly_plus/responses.rb', line 36 def initialize(response) super @events = !check_nil(response['events']).nil? ? get_events(response['events']) : response['events'] @org = !response['org'].nil? ? TicketflyPlus::Objects::Org.new(response['org']) : response['org'] end |
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events.
33 34 35 |
# File 'lib/ticketfly_plus/responses.rb', line 33 def events @events end |
#org ⇒ Object
Returns the value of attribute org.
34 35 36 |
# File 'lib/ticketfly_plus/responses.rb', line 34 def org @org end |
Instance Method Details
#get_events(events) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/ticketfly_plus/responses.rb', line 42 def get_events(events) arr = Array.new if events.length > 0 events.each do |event| arr.push TicketflyPlus::Objects::Event.new(event) end end arr end |