Class: AIXM::Feature::Organisation
- Inherits:
-
AIXM::Feature
- Object
- Component
- AIXM::Feature
- AIXM::Feature::Organisation
- Includes:
- Concerns::Association, Concerns::Remarks
- Defined in:
- lib/aixm/feature/organisation.rb
Overview
Organisations and authorities such as ATS organisations, aircraft operating agencies, states and so forth.
Cheat Sheet in Pseudo Code:
organisation = AIXM.organisation(
source: String or nil
region: String or nil
name: String
type: TYPES
)
organisation.id = String or nil
organisation.remarks = String or nil
organisation.comment = Object or nil
Constant Summary collapse
- TYPES =
{ S: :state, GS: :group_of_states, O: :national_organisation, IO: :international_organisation, AOA: :aircraft_operating_agency, ATS: :air_traffic_services_provider, HA: :handling_authority, A: :national_authority, OTHER: :other # specify in remarks }.freeze
Constants inherited from AIXM::Feature
Instance Attribute Summary collapse
-
#id ⇒ Object
Code of the organisation (e.g. “LF”).
-
#name ⇒ Object
Name of organisation (e.g. “FRANCE”).
-
#type ⇒ Object
Type of organisation.
Attributes included from Concerns::Remarks
Attributes inherited from AIXM::Feature
Attributes inherited from Component
Instance Method Summary collapse
- #add_member(member) ⇒ self
-
#initialize(source: nil, region: nil, name:, type:) ⇒ Organisation
constructor
See the cheat sheet for examples on how to create instances of this class.
- #inspect ⇒ String
-
#members ⇒ Array<AIXM::Feature::Airport, AIXM::Feature::Unit, AIXM::Feature::NavigationalAid>
Aiports, units or navigational aids.
Methods included from Concerns::Association
Methods inherited from AIXM::Feature
Methods included from Concerns::HashEquality
Methods included from Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from Concerns::Memoize
Constructor Details
#initialize(source: nil, region: nil, name:, type:) ⇒ Organisation
See the cheat sheet for examples on how to create instances of this class.
75 76 77 78 |
# File 'lib/aixm/feature/organisation.rb', line 75 def initialize(source: nil, region: nil, name:, type:) super(source: source, region: region) self.name, self.type = name, type end |
Instance Attribute Details
#id ⇒ String? #id=(value) ⇒ Object
Code of the organisation (e.g. “LF”)
71 72 73 |
# File 'lib/aixm/feature/organisation.rb', line 71 def id @id end |
#name ⇒ String #name=(value) ⇒ Object
Name of organisation (e.g. “FRANCE”)
55 56 57 |
# File 'lib/aixm/feature/organisation.rb', line 55 def name @name end |
#type ⇒ Symbol #type=(value) ⇒ Object
Type of organisation
63 64 65 |
# File 'lib/aixm/feature/organisation.rb', line 63 def type @type end |
Instance Method Details
#add_member(member) ⇒ self
47 |
# File 'lib/aixm/feature/organisation.rb', line 47 has_many :members, accept: [:airport, :unit, 'AIXM::Feature::NavigationalAid'] |
#inspect ⇒ String
81 82 83 |
# File 'lib/aixm/feature/organisation.rb', line 81 def inspect %Q(#<#{self.class} name=#{name.inspect} type=#{type.inspect}>) end |
#members ⇒ Array<AIXM::Feature::Airport, AIXM::Feature::Unit, AIXM::Feature::NavigationalAid>
Returns aiports, units or navigational aids.
47 |
# File 'lib/aixm/feature/organisation.rb', line 47 has_many :members, accept: [:airport, :unit, 'AIXM::Feature::NavigationalAid'] |