Class: SVG::Polygon
- Inherits:
-
ElementBase
- Object
- ElementBase
- SVG::Polygon
- Defined in:
- lib/ruby-svg/element.rb
Overview
#
Polygon Class
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Attributes inherited from ElementBase
#attr, #class, #id, #style, #transform
Instance Method Summary collapse
-
#initialize(points) ⇒ Polygon
constructor
A new instance of Polygon.
- #to_s ⇒ Object
Constructor Details
#initialize(points) ⇒ Polygon
Returns a new instance of Polygon.
242 243 244 245 |
# File 'lib/ruby-svg/element.rb', line 242 def initialize(points) super() @points = points end |
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
247 248 249 |
# File 'lib/ruby-svg/element.rb', line 247 def points @points end |
Instance Method Details
#to_s ⇒ Object
249 250 251 252 253 254 |
# File 'lib/ruby-svg/element.rb', line 249 def to_s text = %|<polygon points="#{@points.join(' ')}"| text << super() text << %| />| return text end |