Class: FAA::Delay::AirspaceFlow::Circle
- Inherits:
-
FAA::Delay::AirspaceFlow
- Object
- FAA::Delay::AirspaceFlow
- FAA::Delay::AirspaceFlow::Circle
- Defined in:
- lib/faa/delay/airspace_flow/circle.rb
Instance Attribute Summary collapse
-
#center ⇒ Object
Returns the value of attribute center.
-
#radius ⇒ Object
Returns the value of attribute radius.
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 Attribute Details
#center ⇒ Object
Returns the value of attribute center.
3 4 5 |
# File 'lib/faa/delay/airspace_flow/circle.rb', line 3 def center @center end |
#radius ⇒ Object
Returns the value of attribute radius.
3 4 5 |
# File 'lib/faa/delay/airspace_flow/circle.rb', line 3 def radius @radius end |
Class Method Details
.from_xml(xml) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/faa/delay/airspace_flow/circle.rb', line 5 def self.from_xml(xml) circle = new circle.radius = xml.attributes['Radius'].to_i * 1852 xml.children.each do |child| if child.name == "Center" circle.center << {'latitude' => child.attributes['Lat'].to_f, 'longitude' => child.attributes['Long'].to_f} end end circle end |