Class: FAA::Delay::AirspaceFlow::Line
- Inherits:
-
FAA::Delay::AirspaceFlow
- Object
- FAA::Delay::AirspaceFlow
- FAA::Delay::AirspaceFlow::Line
- Defined in:
- lib/faa/delay/airspace_flow/line.rb
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Attributes inherited from FAA::Delay::AirspaceFlow
#afp_end_time, #afp_start_time, #average, #ceiling, #control_element, #fca_end_time, #fca_start_time, #floor, #reason
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize ⇒ Line
Returns a new instance of Line.
5 6 7 |
# File 'lib/faa/delay/airspace_flow/line.rb', line 5 def initialize @points = [] end |
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
3 4 5 |
# File 'lib/faa/delay/airspace_flow/line.rb', line 3 def points @points end |
Class Method Details
.from_xml(xml) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/faa/delay/airspace_flow/line.rb', line 9 def self.from_xml(xml) line = new xml.children.each do |child| if child.name == "Point" line.points << {'latitude' => child.attributes['Lat'].to_f, 'longitude' => child.attributes['Long'].to_f} end end line end |