Class: NOTAM::G
Overview
The G item defines the upper limit for this NOTAM.
Constant Summary collapse
- RE =
%r( \A G\)\s? (?<all> SFC|GND|UNL| (?<value>\d+)\s?(?<unit>FT|M)\s?(?<base>AMSL|AGL)| (?<unit>FL)\s?(?<value>\d+) ) \z )x.freeze
Constants inherited from Item
Item::ICAO_RE, Item::ID_RE, Item::TIME_RE
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
Methods inherited from Item
#fail!, #initialize, #inspect, #parse, #type, type
Constructor Details
This class inherits a constructor from NOTAM::Item
Instance Method Details
#merge ⇒ Object
29 30 31 |
# File 'lib/notam/item/g.rb', line 29 def merge super(:upper_limit) end |
#upper_limit ⇒ AIXM::Z
20 21 22 23 24 25 26 |
# File 'lib/notam/item/g.rb', line 20 def upper_limit case captures['all'] when 'UNL' then AIXM::UNLIMITED when 'SFC', 'GND' then AIXM::GROUND else limit(*captures.values_at('value', 'unit', 'base')) end end |