class Scale::DSLBuilder

Public Class Methods

new(commands = []) click to toggle source
# File lib/scale/dsl.rb, line 24
def initialize(commands = [])
  @commands = commands
end

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/scale/dsl.rb, line 28
def method_missing(name, *args, &block)
  @commands.push(DSLCommand.new(name, args, block))
end
to_xml() click to toggle source
# File lib/scale/dsl.rb, line 32
def to_xml
  svg = SVG.new
  @commands.each do |command|
    command.run(svg)
  end
  svg.to_xml
end