Class: Echelon::Seaworld::Orlando

Inherits:
Park
  • Object
show all
Defined in:
lib/echelon/parks/seaworld/orlando.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Park

#find_by_id, #find_by_name, #rides

Constructor Details

#initializeOrlando

Returns a new instance of Orlando.



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/echelon/parks/seaworld/orlando.rb', line 29

def initialize
  # fetch the xml file
  http = Net::HTTP.new('lab.defimobile.com', 443)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  _resp, data = http.get('/orlando/rides')

  # were only interested in the ride data, throw everything else away
  xml_data = Nokogiri::HTML(data)
  @xml_data = xml_data.xpath("//ride")
end

Instance Attribute Details

#xml_dataObject (readonly)

Returns the value of attribute xml_data.



10
11
12
# File 'lib/echelon/parks/seaworld/orlando.rb', line 10

def xml_data
  @xml_data
end

Instance Method Details

#ride_listObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/echelon/parks/seaworld/orlando.rb', line 12

def ride_list
  {
    2048 => 'Flying Fiddler',
    2049 => 'Swishy Fishies',
    2034 => 'Kraken',
    2018 => 'Sky Tower',
    2036 => 'Journey to Atlantis',
    2037 => 'Manta',
    2220 => 'Wild Arctic Ride',
    2343 => 'Turtle Trek',
    2008 => 'Sea Carousel',
    2044 => 'Shamu Express',
    2045 => 'Ocean Commotion',
    2046 => 'Jazzy Jellies'
  }
end