Class: NOTAM::Footer
Overview
The footer items contain meta information.
Constant Summary collapse
- RE =
%r( \A (?<key>CREATED|SOURCE):\s* (?<value>.+) \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, #parse, #type, type
Constructor Details
This class inherits a constructor from NOTAM::Item
Instance Method Details
#inspect ⇒ String
35 36 37 |
# File 'lib/notam/item/footer.rb', line 35 def inspect %Q(#<#{self.class} "#{truncated_text(start: 0)}">) end |
#key ⇒ String
16 17 18 |
# File 'lib/notam/item/footer.rb', line 16 def key captures['key'].downcase.to_sym end |
#merge ⇒ Object
29 30 31 32 |
# File 'lib/notam/item/footer.rb', line 29 def merge data[key] = value self end |
#value ⇒ String, Time
21 22 23 24 25 26 |
# File 'lib/notam/item/footer.rb', line 21 def value case key when :created then Time.parse(captures['value'] + ' UTC') else captures['value'] end end |