Class: MapLayers::Feature
- Inherits:
-
Struct
- Object
- Struct
- MapLayers::Feature
- Defined in:
- lib/map_layers/feature.rb
Instance Attribute Summary collapse
-
#geometry ⇒ Object
Returns the value of attribute geometry.
-
#id ⇒ Object
Returns the value of attribute id.
-
#text ⇒ Object
Returns the value of attribute text.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Class Method Summary collapse
Instance Attribute Details
#geometry ⇒ Object
Returns the value of attribute geometry.
4 5 6 |
# File 'lib/map_layers/feature.rb', line 4 def geometry @geometry end |
#id ⇒ Object
Returns the value of attribute id
3 4 5 |
# File 'lib/map_layers/feature.rb', line 3 def id @id end |
#text ⇒ Object
Returns the value of attribute text
3 4 5 |
# File 'lib/map_layers/feature.rb', line 3 def text @text end |
#x ⇒ Object
Returns the value of attribute x
3 4 5 |
# File 'lib/map_layers/feature.rb', line 3 def x @x end |
#y ⇒ Object
Returns the value of attribute y
3 4 5 |
# File 'lib/map_layers/feature.rb', line 3 def y @y end |
Class Method Details
.from_geom(text, geom, id = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/map_layers/feature.rb', line 5 def self.from_geom(text, geom, id = nil) f = new(text, geom.x, geom.y, id) f.geometry = geom f end |