Class: Scale::SVG

Inherits:
Object
  • Object
show all
Includes:
Node
Defined in:
lib/scale/svg.rb

Instance Attribute Summary collapse

Attributes included from Node

#content

Instance Method Summary collapse

Methods included from Node

#add, #append_to, #children, #each, #to_xml, #xml_attributes

Constructor Details

#initialize(width: nil, height: nil) ⇒ SVG

Returns a new instance of SVG.



8
9
10
# File 'lib/scale/svg.rb', line 8

def initialize(width: nil, height: nil)
  @width, @height = width, height
end

Instance Attribute Details

#heightObject

Returns the value of attribute height.



6
7
8
# File 'lib/scale/svg.rb', line 6

def height
  @height
end

#widthObject

Returns the value of attribute width.



6
7
8
# File 'lib/scale/svg.rb', line 6

def width
  @width
end