Class: NOTAM::C
Overview
The C item defines when the NOTAM expires.
Constant Summary collapse
- RE =
%r( \A C\)\s? (?<permanent> PERM| (?<expiration_at>#{TIME_RE}) \s? (?<estimated>EST)? ) \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
#estimated_expiration? ⇒ Boolean
24 25 26 |
# File 'lib/notam/item/c.rb', line 24 def estimated_expiration? !captures['estimated'].nil? end |
#expiration_at ⇒ Time?
19 20 21 |
# File 'lib/notam/item/c.rb', line 19 def expiration_at time(captures['expiration_at']) unless no_expiration? end |
#merge ⇒ Object
34 35 36 |
# File 'lib/notam/item/c.rb', line 34 def merge super(:expiration_at, :estimated_expiration?, :no_expiration?) end |
#no_expiration? ⇒ Boolean
29 30 31 |
# File 'lib/notam/item/c.rb', line 29 def no_expiration? captures['permanent'] == 'PERM' end |