Class: Echelon::Seaworld::SanAntonio

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Park

#find_by_id, #find_by_name, #rides

Constructor Details

#initializeSanAntonio

Returns a new instance of SanAntonio.



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/echelon/parks/seaworld/san_antonio.rb', line 24

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('/seaworld/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/san_antonio.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
# File 'lib/echelon/parks/seaworld/san_antonio.rb', line 12

def ride_list
  {
    10 => 'Shamu Express',
    11 => 'Steel Eel',
    12 => 'Texas Splashdown',
    13 => 'Great White',
    14 => 'Rio Loco',
    15 => 'Journey to Atlantis',
    164 => 'Lost Lagoon'
  }
end