lib/skellington/template.rb in skellington-0.1.4 vs lib/skellington/template.rb in skellington-0.2.0

- old
+ new

@@ -6,21 +6,21 @@ end def outpath @outpath ||= begin subs = @generator.files[@name]['outpath'].split '/' - @outpath = "#{@generator.send(subs[1].to_sym)}/#{@name.sub(subs[0], @generator.send(subs[1].to_sym))}" + @outpath = "#{@generator.path}/#{@generator.send(subs[1].to_sym)}/#{@name.sub(subs[0], @generator.send(subs[1].to_sym))}" rescue NoMethodError - @outpath = "#{@generator.wormname}/#{@name}" + @outpath = "#{@generator.path}/#{@generator.wormname}/#{@name}" end end def templates_dir File.join File.dirname(__FILE__), '..', 'templates' end def write - print "Generating #{outpath}..." + print "Generating #{Skellington.unslash outpath}..." FileUtils.mkdir_p File.dirname outpath f = File.open outpath, 'w' f.write self f.close puts 'done'