Class: AIXM::Component::Geometry::Border

Inherits:
Point show all
Defined in:
lib/aixm/component/geometry/border.rb

Overview

Borders are following natural or artifical border lines referenced by #name and starting at Point#xy.

Cheat Sheet in Pseudo Code:

border = AIXM.border(
  xy: AIXM.xy
  name: String
)

Instance Attribute Summary collapse

Attributes inherited from Point

#xy

Instance Method Summary collapse

Methods inherited from Point

#geometry

Methods included from AIXM::Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from AIXM::Concerns::Memoize

included, method

Methods included from AIXM::Concerns::Association

included

Constructor Details

#initialize(xy:, name:) ⇒ Border

See the cheat sheet for examples on how to create instances of this class.



29
30
31
32
# File 'lib/aixm/component/geometry/border.rb', line 29

def initialize(xy:, name:)
  super(xy: xy)
  self.name = name
end

Instance Attribute Details

#nameString #name=(value) ⇒ Object

Name of the border

Overloads:

  • #nameString

    Returns:

    • (String)
  • #name=(value) ⇒ Object

    Parameters:

    • value (String)


25
26
27
# File 'lib/aixm/component/geometry/border.rb', line 25

def name
  @name
end

Instance Method Details

#inspectString

Returns:

  • (String)


35
36
37
# File 'lib/aixm/component/geometry/border.rb', line 35

def inspect
  %Q(#<#{self.class} xy="#{xy}" name=#{name.inspect}>)
end