Class: AIXM::Feature Abstract

Inherits:
Object show all
Defined in:
lib/aixm/feature.rb,
lib/aixm/feature/unit.rb,
lib/aixm/feature/address.rb,
lib/aixm/feature/airport.rb,
lib/aixm/feature/airspace.rb,
lib/aixm/feature/obstacle.rb,
lib/aixm/feature/organisation.rb,
lib/aixm/feature/obstacle_group.rb,
lib/aixm/feature/navigational_aid.rb,
lib/aixm/feature/navigational_aid/dme.rb,
lib/aixm/feature/navigational_aid/ndb.rb,
lib/aixm/feature/navigational_aid/vor.rb,
lib/aixm/feature/navigational_aid/tacan.rb,
lib/aixm/feature/navigational_aid/marker.rb,
lib/aixm/feature/navigational_aid/designated_point.rb

Overview

This class is abstract.

Defined Under Namespace

Classes: Address, Airport, Airspace, NavigationalAid, Obstacle, ObstacleGroup, Organisation, Unit

Constant Summary collapse

REGION_RE =
/\A[A-Z]{2}\z/.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source: nil, region: nil) ⇒ Feature


15
16
17
18
# File 'lib/aixm/feature.rb', line 15

def initialize(source: nil, region: nil)
  self.source = source
  self.region = region || AIXM.config.region
end

Instance Attribute Details

#regionString


13
14
15
# File 'lib/aixm/feature.rb', line 13

def region
  @region
end

#sourceString


10
11
12
# File 'lib/aixm/feature.rb', line 10

def source
  @source
end

Instance Method Details

#==(other) ⇒ Boolean


31
32
33
# File 'lib/aixm/feature.rb', line 31

def ==(other)
  self.__class__ === other && self.to_uid == other.to_uid
end