Class: TripSpark::Pattern
- Defined in:
- lib/tripspark_api/models/pattern.rb
Instance Method Summary collapse
-
#stops ⇒ Object
Return only the pattern points of this pattern that have the type ‘BusStop`.
-
#waypoints ⇒ Object
Return only the pattern points of this pattern that have the type ‘WayPoint`.
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
#stops ⇒ Object
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 |
#waypoints ⇒ Object
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 |