Class: MapPoint::PointXPathBuilder
- Inherits:
-
Object
- Object
- MapPoint::PointXPathBuilder
- Defined in:
- lib/map/point.rb
Overview
Point builder class
Instance Attribute Summary collapse
-
#point ⇒ Object
readonly
Returns the value of attribute point.
Instance Method Summary collapse
- #add_x(x) ⇒ Object
- #add_y(y) ⇒ Object
- #add_z(z) ⇒ Object
-
#build_XML_point(x, y, z) ⇒ Object
Builds the point of a node.
-
#initialize ⇒ PointXPathBuilder
constructor
A new instance of PointXPathBuilder.
Constructor Details
#initialize ⇒ PointXPathBuilder
Returns a new instance of PointXPathBuilder.
43 44 45 |
# File 'lib/map/point.rb', line 43 def initialize() @point = Point.new() end |
Instance Attribute Details
#point ⇒ Object (readonly)
Returns the value of attribute point.
47 48 49 |
# File 'lib/map/point.rb', line 47 def point @point end |
Instance Method Details
#add_x(x) ⇒ Object
56 57 58 |
# File 'lib/map/point.rb', line 56 def add_x(x) @point.x = x end |
#add_y(y) ⇒ Object
60 61 62 |
# File 'lib/map/point.rb', line 60 def add_y(y) @point.y = y end |
#add_z(z) ⇒ Object
64 65 66 |
# File 'lib/map/point.rb', line 64 def add_z(z) @point.z = z end |
#build_XML_point(x, y, z) ⇒ Object
Builds the point of a node
50 51 52 53 54 |
# File 'lib/map/point.rb', line 50 def build_XML_point(x, y, z) add_x(x.to_i) add_y(y.to_i) add_z(z.to_i) end |