Class: AIXM::Component::Address
- Inherits:
-
AIXM::Component
- Object
- AIXM::Component
- AIXM::Component::Address
- Defined in:
- lib/aixm/component/address.rb
Overview
Address or similar means to contact an entity.
Cheat Sheet in Pseudo Code:
address = AIXM.address(
type: TYPES
address: AIXM.f (type :radio_frequency) or String (other types)
)
address.remarks = String or nil
Constant Summary collapse
- TYPES =
{ POST: :postal_address, PHONE: :phone, 'PHONE-MET': :weather_phone, FAX: :fax, TLX: :telex, SITA: :sita, AFS: :aeronautical_fixed_service_address, EMAIL: :email, URL: :url, 'URL-CAM': :webcam, 'URL-MET': :weather_url, RADIO: :radio_frequency, OTHER: :other # specify in remarks }.freeze
Instance Attribute Summary collapse
-
#address ⇒ Object
Postal address, phone number, radio frequency etc.
-
#type ⇒ Object
Type of address.
Attributes included from AIXM::Concerns::Remarks
Attributes inherited from AIXM::Component
Instance Method Summary collapse
-
#addressable ⇒ AIXM::Feature
Addressable feature.
-
#initialize(type:, address:) ⇒ Address
constructor
See the cheat sheet for examples on how to create instances of this class.
- #inspect ⇒ String
Methods included from AIXM::Concerns::Association
Methods included from AIXM::Concerns::HashEquality
Methods included from AIXM::Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from AIXM::Concerns::Memoize
Constructor Details
#initialize(type:, address:) ⇒ Address
See the cheat sheet for examples on how to create instances of this class.
60 61 62 |
# File 'lib/aixm/component/address.rb', line 60 def initialize(type:, address:) self.type, self.address = type, address end |
Instance Attribute Details
#address ⇒ String #address=(value) ⇒ Object
Postal address, phone number, radio frequency etc
56 57 58 |
# File 'lib/aixm/component/address.rb', line 56 def address @address end |
#type ⇒ Symbol #type=(value) ⇒ Object
Type of address
48 49 50 |
# File 'lib/aixm/component/address.rb', line 48 def type @type end |
Instance Method Details
#addressable ⇒ AIXM::Feature
Returns addressable feature.
40 |
# File 'lib/aixm/component/address.rb', line 40 belongs_to :addressable |
#inspect ⇒ String
65 66 67 |
# File 'lib/aixm/component/address.rb', line 65 def inspect %Q(#<#{self.class} type=#{type.inspect}>) end |