Sha256: 7b3724650e941980c0512386ec43f85f6a0217cca6d338301b1f22fb4cb3dee3
Contents?: true
Size: 749 Bytes
Versions: 6
Compression:
Stored size: 749 Bytes
Contents
module GoodData::Command class Scaffold class << self def brick(name) require 'erubis' require 'fileutils' templates_path = Pathname(__FILE__) + "../../../templates" FileUtils.mkdir(name) FileUtils.cd(name) do input = File.read(templates_path + 'bricks/brick.rb.erb') eruby = Erubis::Eruby.new(input) File.open("brick.rb", 'w') do |f| f.write(eruby.result()) end input = File.read(templates_path + 'bricks/main.rb.erb') eruby = Erubis::Eruby.new(input) File.open("main.rb", 'w') do |f| f.write(eruby.result()) end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems