class SeptaStopLocator::Route

Public Class Methods

new(route) click to toggle source
# File lib/septa_stop_locator/route.rb, line 7
def initialize(route)
  @uri = URI.parse("http://www3.septa.org/hackathon/Stops/#{route}")
end

Public Instance Methods

stops() click to toggle source
# File lib/septa_stop_locator/route.rb, line 11
def stops
  @stops ||= JSON.parse(get_stops)
end

Private Instance Methods

get_stops() click to toggle source
# File lib/septa_stop_locator/route.rb, line 17
def get_stops
  Net::HTTP.get(@uri)
end