Class: TripSpark::Pattern

Inherits:
Model
  • Object
show all
Defined in:
lib/tripspark_api/models/pattern.rb

Instance Method Summary collapse

Methods inherited from Model

#==, #assign, attribute, attributes, delegate, #identifier, #initialize, primary_attribute

Constructor Details

This class inherits a constructor from TripSpark::Model

Instance Method Details

#stopsObject

Return only the pattern points of this pattern that have the type ‘BusStop`



32
33
34
# File 'lib/tripspark_api/models/pattern.rb', line 32

def stops
  @stops ||= pattern_point_list.select{ |point| point.type == "BusStop" }
end

#waypointsObject

Return only the pattern points of this pattern that have the type ‘WayPoint`



37
38
39
# File 'lib/tripspark_api/models/pattern.rb', line 37

def waypoints
  @waypoints ||= pattern_point_list.select{ |point| point.type == "WayPoint" }
end