Class: Yar::ScheduleResource
- Defined in:
- lib/Yar/resources/schedule.rb,
lib/yar/resources/schedule.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#between(from:, to:) ⇒ Object
TODO: move to Schedule.between(from: to:) -> Schedule.
-
#info(station:) ⇒ Object
TODO: move to Schedule.info station: -> Schedule.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Yar::Resource
Instance Method Details
#between(from:, to:) ⇒ Object
TODO: move to Schedule.between(from: to:) -> Schedule
11 12 13 |
# File 'lib/Yar/resources/schedule.rb', line 11 def between(from:, to:) Schedule.new get("search/?from=#{from}&to=#{to}").body end |
#info(station:) ⇒ Object
TODO: move to Schedule.info station: -> Schedule
6 7 8 |
# File 'lib/Yar/resources/schedule.rb', line 6 def info(station:) Schedule.new get("schedule/?station=#{station}").body end |