Class: Ns::DisruptionCollection
- Inherits:
-
Object
- Object
- Ns::DisruptionCollection
- Includes:
- Model
- Defined in:
- lib/ns/disruption_collection.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
If actual=true, the unplanned disruptions are returned, as well as the planned disruptions (due to maintenance) that will occur within two hours of the request.
-
#include_planned ⇒ Object
For some reason NS has decided that passing “unplanned=true” will return the planned disruptions.
-
#station ⇒ Object
Returns the value of attribute station.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#actual ⇒ Object
If actual=true, the unplanned disruptions are returned, as well as the planned disruptions (due to maintenance) that will occur within two hours of the request.
20 21 22 |
# File 'lib/ns/disruption_collection.rb', line 20 def actual @actual end |
#include_planned ⇒ Object
For some reason NS has decided that passing “unplanned=true” will return the planned disruptions. We pass a default value of unplanned=false so planned disruptions don’t show up by default.
30 31 32 |
# File 'lib/ns/disruption_collection.rb', line 30 def include_planned @include_planned end |
#station ⇒ Object
Returns the value of attribute station.
5 6 7 |
# File 'lib/ns/disruption_collection.rb', line 5 def station @station end |
Instance Method Details
#planned_disruptions ⇒ Object
7 8 9 |
# File 'lib/ns/disruption_collection.rb', line 7 def planned_disruptions @planned_disruptions ||= response.planned_disruptions end |
#unplanned_disruptions ⇒ Object
11 12 13 |
# File 'lib/ns/disruption_collection.rb', line 11 def unplanned_disruptions @planned_disruptions ||= response.unplanned_disruptions end |