Class: GoTransit::Schedule::AllLines
- Inherits:
-
ApiResource
- Object
- ApiResource
- GoTransit::Schedule::AllLines
- Includes:
- Enumerable
- Defined in:
- lib/go_transit/resources/schedule/all_lines.rb
Defined Under Namespace
Classes: Line
Instance Attribute Summary collapse
-
#lines ⇒ Object
Returns the value of attribute lines.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ApiResource
Constructor Details
This class inherits a constructor from GoTransit::ApiResource
Instance Attribute Details
#lines ⇒ Object
Returns the value of attribute lines.
5 6 7 |
# File 'lib/go_transit/resources/schedule/all_lines.rb', line 5 def lines @lines end |
Class Method Details
.all(date:) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/go_transit/resources/schedule/all_lines.rb', line 7 def self.all(date:) formatted_date = date.strftime("%Y%m%d") client = Client.new response = client.get("Schedule/Line/All/#{formatted_date}") new(response.data) end |
Instance Method Details
#each(&block) ⇒ Object
14 15 16 |
# File 'lib/go_transit/resources/schedule/all_lines.rb', line 14 def each(&block) lines.each(&block) end |