Sha256: 6c02a8f06c35ab0038897caa95ca5e10bdd0361013968c653259b058710b6b73
Contents?: true
Size: 635 Bytes
Versions: 6
Compression:
Stored size: 635 Bytes
Contents
require 'joosy/generators' require 'ejs' module Joosy module Generators class Base < ::Rails::Generators::Base protected def self.source_root Joosy.templates_path end def run(instructions) instructions.each do |i| case i[0] when 'file' create_file i[1] when 'copy' copy_file i[2], i[1] when 'template' source = File.expand_path(find_in_source_paths(i[2])) create_file i[1] do EJS.evaluate(File.read(source), i[3]) end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems