Class: SVG::Use
- Inherits:
-
ElementBase
- Object
- ElementBase
- SVG::Use
- Defined in:
- lib/ruby-svg/element.rb
Overview
#
Use Class
Instance Attribute Summary collapse
-
#uri ⇒ Object
Returns the value of attribute uri.
Attributes inherited from ElementBase
#attr, #class, #id, #style, #transform
Instance Method Summary collapse
-
#initialize(uri) ⇒ Use
constructor
A new instance of Use.
- #to_s ⇒ Object
Constructor Details
#initialize(uri) ⇒ Use
Returns a new instance of Use.
103 104 105 106 |
# File 'lib/ruby-svg/element.rb', line 103 def initialize(uri) super() @uri = uri end |
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
108 109 110 |
# File 'lib/ruby-svg/element.rb', line 108 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
110 111 112 113 114 |
# File 'lib/ruby-svg/element.rb', line 110 def to_s text = %|<use| text << super() text << %| xlink:href="#{@uri}"/>\n| end |