def generate name, file
      require 'erb'
      template = File.read(File.join(File.dirname(__FILE__), "class_template.erb"))
      erb = ERB.new(template)
      code = erb.result(binding)
      Dir.mkdir(@basedir) unless File.directory?(@basedir)
      File.open(file, "w+") do |f|
        f.puts code
      end
    end
def generate name, file
      require 'erb'
      template = File.read(File.join(File.dirname(__FILE__), "class_template.erb"))
      erb = ERB.new(template)
      code = erb.result(binding)
      Dir.mkdir(@basedir) unless File.directory?(@basedir)
      File.open(file, "w+") do |f|
        f.puts code
      end
    end
generate .rb class declaration