Class: AIXM::Component::Geometry::Border
- Defined in:
- lib/aixm/component/geometry/border.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ String
Name of the border.
Attributes inherited from Point
Instance Method Summary collapse
-
#initialize(xy:, name:) ⇒ Border
constructor
A new instance of Border.
- #inspect ⇒ String
-
#to_xml ⇒ String
AIXM or OFMX markup.
Constructor Details
#initialize(xy:, name:) ⇒ Border
21 22 23 24 |
# File 'lib/aixm/component/geometry/border.rb', line 21 def initialize(xy:, name:) super(xy: xy) self.name = name end |
Instance Attribute Details
#name ⇒ String
19 20 21 |
# File 'lib/aixm/component/geometry/border.rb', line 19 def name @name end |
Instance Method Details
#inspect ⇒ String
27 28 29 |
# File 'lib/aixm/component/geometry/border.rb', line 27 def inspect %Q(#<#{self.class} xy="#{xy}" name=#{name.inspect}>) end |
#to_xml ⇒ String
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/aixm/component/geometry/border.rb', line 37 def to_xml builder = Builder::XmlMarkup.new(indent: 2) builder.Avx do |avx| avx.GbrUid do |gbr_uid| gbr_uid.txtName(name.to_s) end avx.codeType('FNT') avx.geoLat(xy.lat(AIXM.schema)) avx.geoLong(xy.long(AIXM.schema)) avx.codeDatum('WGE') end end |