Class: CTA::CustomerAlerts::RouteStatusResponse

Inherits:
API::Response show all
Defined in:
lib/cta_redux/api/customer_alerts.rb

Instance Attribute Summary collapse

Attributes inherited from API::Response

#error, #parsed_body, #raw_body, #timestamp

Instance Method Summary collapse

Constructor Details

#initialize(parsed_body, raw_body, debug) ⇒ RouteStatusResponse

Returns a new instance of RouteStatusResponse.



104
105
106
107
# File 'lib/cta_redux/api/customer_alerts.rb', line 104

def initialize(parsed_body, raw_body, debug)
  super(parsed_body, raw_body, debug)
  @routes = Array.wrap(parsed_body["CTARoutes"]["RouteInfo"]).map { |r| RouteStatus.new(r) }
end

Instance Attribute Details

#routesArray<RouteStatus> (readonly)

Returns An array of CTA::CustomerAlerts::RouteStatus objects that match the requested query.

Returns:



102
103
104
# File 'lib/cta_redux/api/customer_alerts.rb', line 102

def routes
  @routes
end