Sha256: 0c169dbdbc3b9c809bcd120becb5ff2330bc97ba546eb293caa15a3264d97df1
Contents?: true
Size: 936 Bytes
Versions: 10
Compression:
Stored size: 936 Bytes
Contents
module Skellington class Generator attr_reader :path, :filename, :camelname, :files, :gems attr_accessor :licensor def initialize path @full_path = path @path = File.dirname @full_path @filename = File.basename(@full_path) @camelname = Skellington.camelise(wormname) @gems = config['gems'] @files = config['files'] end def config @config ||= YAML.load File.read File.join File.dirname(__FILE__), '..', '..', 'config/config.yaml' end def run generate git_init post_run end def generate @files.each do |k, v| t = Template.new k, self t.write end end def wormname @filename.gsub('-', '_') end def renamed @filename != wormname end def git_init Git.init wormname end def post_run t = Template.new 'post-run', self puts t.to_s end end end
Version data entries
10 entries across 10 versions & 1 rubygems