class SVGCreator

Public Class Methods

new(width,height) click to toggle source

Use SVGCreator to add svg components to an array Method 'svg' concatenates the array elements, adds header and footer, and returns svg string

# File lib/teaching_printables/svg/svg_creator.rb, line 7
def initialize(width,height)
  @width = width
  @height = height
  @components = []
end

Public Instance Methods

svg() click to toggle source
# File lib/teaching_printables/svg/svg_creator.rb, line 13
def svg
  @components.insert(0,SVGComponents::header(@width,@height))
  @components << SVGComponents::footer
  return @components.join
end