Sha256: ce505c16186c95d712a91da651daacf2ed22029d58beaeeab3a89811919df60e
Contents?: true
Size: 560 Bytes
Versions: 2
Compression:
Stored size: 560 Bytes
Contents
module Rakyll module Compiler module Apply def apply(template_name) template_string = File.read('templates/' + template_name) @body = ERB.new(template_string).result(binding) end end module SetFilename def set_filename(source_filename, ext = nil) pathname = Pathname.new(source_filename) pathname = pathname.sub_ext(ext) unless ext.nil? @url = '/' + pathname.to_s @filename = '_site/' + pathname.to_s FileUtils.mkdir_p(File.dirname(@filename)) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rakyll-0.1.1 | lib/rakyll/compiler.rb |
rakyll-0.1.0 | lib/rakyll/compiler.rb |