Class: FAA::Delay::AirspaceFlow::Polygon::PointsList
- Inherits:
-
Object
- Object
- FAA::Delay::AirspaceFlow::Polygon::PointsList
- Defined in:
- lib/faa/delay/airspace_flow/polygon/point_list.rb
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ PointsList
constructor
A new instance of PointsList.
Constructor Details
#initialize ⇒ PointsList
Returns a new instance of PointsList.
5 6 7 |
# File 'lib/faa/delay/airspace_flow/polygon/point_list.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/polygon/point_list.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/polygon/point_list.rb', line 9 def self.from_xml(xml) list = new xml.children.each do |child| if child.name == "Point" list.points << {'latitude' => child.attributes['Lat'].to_f, 'longitude' => child.attributes['Long'].to_f} end end list end |