Class: CloudMade::MultiLine
- Defined in:
- lib/cloudmade/geometry.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
Returns the value of attribute lines.
Instance Method Summary collapse
-
#initialize(coords) ⇒ MultiLine
constructor
A new instance of MultiLine.
- #to_s ⇒ Object
- #to_wkt ⇒ Object
- #wkt_helper ⇒ Object
Methods inherited from Geometry
Constructor Details
Instance Attribute Details
#lines ⇒ Object
Returns the value of attribute lines.
99 100 101 |
# File 'lib/cloudmade/geometry.rb', line 99 def lines @lines end |
Instance Method Details
#to_s ⇒ Object
105 106 107 |
# File 'lib/cloudmade/geometry.rb', line 105 def to_s "MultiLine(#{@lines.join(',')})" end |
#to_wkt ⇒ Object
109 110 111 |
# File 'lib/cloudmade/geometry.rb', line 109 def to_wkt "MULTILINESTRING (#{wkt_helper})" end |
#wkt_helper ⇒ Object
113 114 115 |
# File 'lib/cloudmade/geometry.rb', line 113 def wkt_helper @lines.map(&:wkt_helper).join(', ') end |