Class: Echelon::Seaworld::SanAntonio
- Defined in:
- lib/echelon/parks/seaworld/san_antonio.rb
Instance Attribute Summary collapse
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize ⇒ SanAntonio
constructor
A new instance of SanAntonio.
- #ride_list ⇒ Object
Methods inherited from Park
#find_by_id, #find_by_name, #rides
Constructor Details
#initialize ⇒ SanAntonio
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_data ⇒ Object (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_list ⇒ Object
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 |