Class: FAA::Delay

Inherits:
Object
  • Object
show all
Defined in:
lib/faa/delay.rb

Direct Known Subclasses

General, GroundDelay, GroundStop

Defined Under Namespace

Classes: AirspaceFlow, General, GeneralArrival, GeneralDeparture, GroundDelay, GroundStop

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#airport_idObject

Returns the value of attribute airport_id.



3
4
5
# File 'lib/faa/delay.rb', line 3

def airport_id
  @airport_id
end

#reasonObject

Returns the value of attribute reason.



3
4
5
# File 'lib/faa/delay.rb', line 3

def reason
  @reason
end

Class Method Details

.from_xml(node, updated_at) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/faa/delay.rb', line 7

def from_xml(node, updated_at)
  delays = []
  node.children.each do |delay_list|
    case delay_list.name
    when 'Ground_Stop_List'
      delays += FAA::Delay::GroundStop.from_xml(delay_list, updated_at)
    when 'Ground_Delay_List'
      delays += FAA::Delay::GroundDelay.from_xml(delay_list)
    when 'Airspace_Flow_List'
      delays += FAA::Delay::AirspaceFlow.from_xml(delay_list)
    when 'Arrival_Departure_Delay_List'
      delays += FAA::Delay::General.from_xml(delay_list)
    when 'Airport_Closure_List'
      delays += FAA::Airport::Closure.from_xml(delay_list)
    end
  end
  delays
end