Class: BikePOA::Client
- Inherits:
-
Object
- Object
- BikePOA::Client
- Defined in:
- lib/bikepoa/client.rb
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #stations ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
4 5 6 7 |
# File 'lib/bikepoa/client.rb', line 4 def initialize @http_client = HttpClient.new @map_parser = MapParser.new end |
Instance Method Details
#stations ⇒ Object
9 10 11 12 13 14 |
# File 'lib/bikepoa/client.rb', line 9 def stations map_page = @http_client.fetch @map_parser.parse(map_page).map do |station_data| Station.new(station_data) end end |