Class: CTA::CustomerAlerts::RouteStatus
- Inherits:
-
Object
- Object
- CTA::CustomerAlerts::RouteStatus
- Defined in:
- lib/cta_redux/api/customer_alerts.rb
Instance Attribute Summary collapse
-
#route ⇒ CTA::Route
readonly
The Route that corresponds to this RouteStatus.
-
#route_color ⇒ String
readonly
The color the CTA suggests when displaying information about this alert.
-
#route_text_color ⇒ String
readonly
The color of text the CTA suggests when displaying information about this alert.
-
#status ⇒ String
readonly
A text description of the status of this route.
-
#status_color ⇒ String
readonly
A color suggestion from the CTA when displaying information about the route status.
Instance Method Summary collapse
-
#initialize(s) ⇒ RouteStatus
constructor
A new instance of RouteStatus.
Constructor Details
#initialize(s) ⇒ RouteStatus
Returns a new instance of RouteStatus.
19 20 21 22 23 24 25 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 19 def initialize(s) @route = CTA::Route.where(:route_id => s["Route"].split(" ").first).or(:route_id => s["ServiceId"]).first @route_color = s["RouteColorCode"] @route_text_color = s["RouteTextColor"] @status = s["RouteStatus"] @status_color = s["RouteStatusColor"] end |
Instance Attribute Details
#route ⇒ CTA::Route (readonly)
Returns The Route that corresponds to this CTA::CustomerAlerts::RouteStatus.
9 10 11 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 9 def route @route end |
#route_color ⇒ String (readonly)
Returns The color the CTA suggests when displaying information about this alert.
11 12 13 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 11 def route_color @route_color end |
#route_text_color ⇒ String (readonly)
Returns The color of text the CTA suggests when displaying information about this alert.
13 14 15 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 13 def route_text_color @route_text_color end |
#status ⇒ String (readonly)
Returns A text description of the status of this route.
15 16 17 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 15 def status @status end |
#status_color ⇒ String (readonly)
Returns A color suggestion from the CTA when displaying information about the route status.
17 18 19 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 17 def status_color @status_color end |