Class: Yar::ScheduleResource

Inherits:
Resource show all
Defined in:
lib/Yar/resources/schedule.rb,
lib/yar/resources/schedule.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

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