Class: FAA::Delay::AirspaceFlow::Polygon

Inherits:
FAA::Delay::AirspaceFlow show all
Defined in:
lib/faa/delay/airspace_flow/polygon.rb

Defined Under Namespace

Classes: PointsList

Instance Attribute Summary collapse

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

Constructor Details

#initializePolygon

Returns a new instance of Polygon.



5
6
7
# File 'lib/faa/delay/airspace_flow/polygon.rb', line 5

def initialize
  @point_lists = []
end

Instance Attribute Details

#point_listsObject

Returns the value of attribute point_lists.



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

def point_lists
  @point_lists
end

Class Method Details

.from_xml(xml) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/faa/delay/airspace_flow/polygon.rb', line 9

def self.from_xml(xml)
  poly = new
  xml.children.each do |child|
    if child.name == "PointsList"
      poly.point_lists << PointsList.from_xml(child)
    end
  end
  poly
end