Class: Echelon::Seaworld::SanDiego
- Defined in:
- lib/echelon/parks/seaworld/san_diego.rb
Instance Attribute Summary collapse
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize ⇒ SanDiego
constructor
A new instance of SanDiego.
- #ride_list ⇒ Object
Methods inherited from Park
#find_by_id, #find_by_name, #rides
Constructor Details
#initialize ⇒ SanDiego
Returns a new instance of SanDiego.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/echelon/parks/seaworld/san_diego.rb', line 26 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('/san_diego/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_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
10 11 12 |
# File 'lib/echelon/parks/seaworld/san_diego.rb', line 10 def xml_data @xml_data end |
Instance Method Details
#ride_list ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/echelon/parks/seaworld/san_diego.rb', line 12 def ride_list { 1034 => 'Shipwreck Rapids', 1239 => 'Manta', 1024 => 'Skytower', 1010 => 'Journey to Atlantis', 1011 => 'Wild Arctic Ride', 1122 => 'Elmo\'s Flying Fish', 1029 => 'Skyride', 1123 => 'Abby\'s Sea Star Spin', 1121 => 'Oscar\'s Rocking Eel' } end |