Class: NOTAM::F

Inherits:
Item
  • Object
show all
Defined in:
lib/notam/item/f.rb

Overview

The F item defines the lower limit for this NOTAM.

Constant Summary collapse

RE =
%r(
  \A
  F\)\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

#captures, #data, #text

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

#lower_limitAIXM::Z

Returns:

  • (AIXM::Z)


20
21
22
23
24
25
26
# File 'lib/notam/item/f.rb', line 20

def lower_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

#mergeObject

See Also:



29
30
31
# File 'lib/notam/item/f.rb', line 29

def merge
  super(:lower_limit)
end