Class: FAA::Delay::GroundStop
- Inherits:
-
FAA::Delay
- Object
- FAA::Delay
- FAA::Delay::GroundStop
- Defined in:
- lib/faa/delay/ground_stop.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Returns the value of attribute end_time.
Attributes inherited from FAA::Delay
Class Method Summary collapse
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time.
3 4 5 |
# File 'lib/faa/delay/ground_stop.rb', line 3 def end_time @end_time end |
Class Method Details
.from_xml(xml) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/faa/delay/ground_stop.rb', line 5 def self.from_xml(xml) delays = [] xml.children.each do |node| delay = new node.children.each do |child| case child.name when 'ARPT' delay.airport_id = child.content.strip when 'Reason' delay.reason = child.content.strip when 'End_Time' delay.end_time = Time.parse(child.content) end end delays << delay end delays end |