Class: SVG::Polyline

Inherits:
ElementBase show all
Defined in:
lib/ruby-svg/element.rb

Overview

#

Polyline Class

Instance Attribute Summary collapse

Attributes inherited from ElementBase

#attr, #class, #id, #style, #transform

Instance Method Summary collapse

Constructor Details

#initialize(points) ⇒ Polyline

Returns a new instance of Polyline.



222
223
224
225
# File 'lib/ruby-svg/element.rb', line 222

def initialize(points)
  super()
  @points = points
end

Instance Attribute Details

#pointsObject

Returns the value of attribute points.



227
228
229
# File 'lib/ruby-svg/element.rb', line 227

def points
  @points
end

Instance Method Details

#to_sObject



229
230
231
232
233
234
# File 'lib/ruby-svg/element.rb', line 229

def to_s
  text = %|<polyline points="#{@points.join(' ')}"|
  text << super()
  text << %| />|
  return text
end