Class: Capitan::Calendar::CalendarShow

Inherits:
Object
  • Object
show all
Includes:
ObjectInitializer
Defined in:
lib/capitan/calendar/calendar_show.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ObjectInitializer

#initialize

Instance Attribute Details

#buy_tickets_urlObject

Returns the value of attribute buy_tickets_url.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def buy_tickets_url
  @buy_tickets_url
end

#calendar_textObject

Returns the value of attribute calendar_text.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def calendar_text
  @calendar_text
end

#capi_show_detail_urlObject

Returns the value of attribute capi_show_detail_url.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def capi_show_detail_url
  @capi_show_detail_url
end

#dateObject

Returns the value of attribute date.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def date
  @date
end

#presenter_nameObject

Returns the value of attribute presenter_name.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def presenter_name
  @presenter_name
end

#show_detail_urlObject

Returns the value of attribute show_detail_url.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def show_detail_url
  @show_detail_url
end

#show_typeObject

Returns the value of attribute show_type.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def show_type
  @show_type
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def title
  @title
end

#venueObject

Returns the value of attribute venue.



6
7
8
# File 'lib/capitan/calendar/calendar_show.rb', line 6

def venue
  @venue
end

Instance Method Details

#get_detailObject



17
18
19
20
21
# File 'lib/capitan/calendar/calendar_show.rb', line 17

def get_detail
  connection = Capitan::Connection.new
  response = connection.invoke_with_full_url(capi_show_detail_url)
  show_type_class.new(response)
end

#show_type_classObject



9
10
11
12
13
14
15
# File 'lib/capitan/calendar/calendar_show.rb', line 9

def show_type_class
  klass = nil
  klass = Capitan::Production if show_type == 'Production'
  klass = Capitan::NonTicketedEvent if show_type == 'Non-Ticketed Event'
  klass = Capitan::Exhibition if show_type == 'Exhibition'
  klass
end