Class: Ns::Api::Response::DisruptionCollection
- Inherits:
-
Object
- Object
- Ns::Api::Response::DisruptionCollection
- Includes:
- Model
- Defined in:
- lib/ns/api/response/disruption_collection.rb
Instance Attribute Summary collapse
-
#parsed_response ⇒ Object
Returns the value of attribute parsed_response.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#parsed_response ⇒ Object
Returns the value of attribute parsed_response.
7 8 9 |
# File 'lib/ns/api/response/disruption_collection.rb', line 7 def parsed_response @parsed_response end |
Instance Method Details
#planned_disruptions ⇒ Object
9 10 11 12 13 |
# File 'lib/ns/api/response/disruption_collection.rb', line 9 def planned_disruptions ( raw_disruptions['Gepland'] || [] ).map do |raw_disruption| new_disruption(raw_disruption) end.flatten.compact end |
#unplanned_disruptions ⇒ Object
15 16 17 18 19 |
# File 'lib/ns/api/response/disruption_collection.rb', line 15 def unplanned_disruptions ( raw_disruptions['Ongepland'] || [] ).map do |raw_disruption| new_disruption(raw_disruption) end.flatten.compact end |