Class: Svg::Line
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Attributes inherited from Feature
#fill, #fill_opacity, #stroke, #stroke_opacity, #stroke_width, #style
Instance Method Summary collapse
Methods inherited from Feature
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
128 129 130 |
# File 'lib/svg.rb', line 128 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
128 129 130 |
# File 'lib/svg.rb', line 128 def to @to end |
Instance Method Details
#to_svg ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/svg.rb', line 129 def to_svg string_val = "<line" string_val += point_to_s 'x1', 'y1', from string_val += point_to_s 'x2', 'y2', to if not style.nil? string_val += " style=\"#{style.to_s}\"" end string_val += "/>" return string_val end |