class Scale::DSLCommand
Public Class Methods
new(name, args, block)
click to toggle source
# File lib/scale/dsl.rb, line 11 def initialize(name, args, block) @name = name @args = args @block = block end
Public Instance Methods
run(svg)
click to toggle source
# File lib/scale/dsl.rb, line 17 def run(svg) type = Kernel.const_get("Scale::#{@name.to_s.capitalize}") svg.add(type.new(*@args)) end