class AIXM::Feature
@abstract
Constants
- REGION_RE
Attributes
region[R]
@return [String] OFMX region all features in this document belong to
source[R]
@return [String] reference to source of the feature data
Public Class Methods
new(source: nil, region: nil)
click to toggle source
# File lib/aixm/feature.rb 15 def initialize(source: nil, region: nil) 16 self.source = source 17 self.region = region || AIXM.config.region 18 end
Public Instance Methods
==(other)
click to toggle source
@return [Boolean]
# File lib/aixm/feature.rb 31 def ==(other) 32 self.__class__ === other && self.to_uid == other.to_uid 33 end
region=(value)
click to toggle source
# File lib/aixm/feature.rb 25 def region=(value) 26 fail(ArgumentError, "invalid region") unless value.nil? || (value.is_a?(String) && value.upcase.match?(REGION_RE)) 27 @region = value&.upcase 28 end
source=(value)
click to toggle source
# File lib/aixm/feature.rb 20 def source=(value) 21 fail(ArgumentError, "invalid source") unless value.nil? || value.is_a?(String) 22 @source = value 23 end