Class: GoTransit::ServiceUpdate::Exceptions

Inherits:
ApiResource
  • Object
show all
Includes:
Enumerable
Defined in:
lib/go_transit/resources/service_update/exceptions.rb

Defined Under Namespace

Classes: Trip

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiResource

#initialize

Constructor Details

This class inherits a constructor from GoTransit::ApiResource

Instance Attribute Details

#tripsObject

Returns the value of attribute trips.



5
6
7
# File 'lib/go_transit/resources/service_update/exceptions.rb', line 5

def trips
  @trips
end

Class Method Details

.allObject



19
20
21
22
23
# File 'lib/go_transit/resources/service_update/exceptions.rb', line 19

def self.all
  client = Client.new
  response = client.get("ServiceUpdate/Exceptions/All")
  new(response.data)
end

.busObject



13
14
15
16
17
# File 'lib/go_transit/resources/service_update/exceptions.rb', line 13

def self.bus
  client = Client.new
  response = client.get("ServiceUpdate/Exceptions/Bus")
  new(response.data)
end

.trainObject



7
8
9
10
11
# File 'lib/go_transit/resources/service_update/exceptions.rb', line 7

def self.train
  client = Client.new
  response = client.get("ServiceUpdate/Exceptions/Train")
  new(response.data)
end

Instance Method Details

#each(&block) ⇒ Object



25
26
27
# File 'lib/go_transit/resources/service_update/exceptions.rb', line 25

def each(&block)
  trips.each(&block)
end