class ParkInfo::DisneyResort

Constants

PARK_ID
RESORT_ID

Public Instance Methods

attractions() click to toggle source
# File lib/disney/disney_resort.rb, line 16
def attractions
    if wait_times_timed_out
        wait_times
        @attractions = ParkInfo::DisneyAttraction.process @data['entries']
    end
    @attractions
end
facilities_info_url() click to toggle source
# File lib/disney/disney_resort.rb, line 28
def facilities_info_url
    "mobile-service/public/destinations/#{resort_id};entityType=destination/facilities?region=#{region}"
end
park_id() click to toggle source
# File lib/disney/disney_resort.rb, line 36
def park_id
    self.class::PARK_ID
end
region() click to toggle source
# File lib/disney/disney_resort.rb, line 40
def region
    self.class::REGION
end
resort_id() click to toggle source
# File lib/disney/disney_resort.rb, line 32
def resort_id
    self.class::RESORT_ID
end
wait_times() click to toggle source
# File lib/disney/disney_resort.rb, line 8
def wait_times
    if wait_times_timed_out
        @data = get(wait_times_url)
        @wait_times_timeout = Time.now + CACHE_TIMEOUT
    end
    @data
end
wait_times_url() click to toggle source
# File lib/disney/disney_resort.rb, line 24
def wait_times_url
     "facility-service/theme-parks/#{park_id};destination=#{resort_id}/wait-times?region=#{region}"
end

Protected Instance Methods

wait_times_timed_out() click to toggle source
# File lib/disney/disney_resort.rb, line 46
def wait_times_timed_out
    @wait_times_timeout.nil? || Time.now > @wait_times_timeout
end