lib/guider/index.rb in guider-0.0.7 vs lib/guider/index.rb in guider-0.0.8

- old
+ new

@@ -1,19 +1,17 @@ -require 'guider/template' +require 'guider/default_template' require 'guider/config' module Guider class Index def initialize(options) @options = options @config = Config.new(@options[:index]) - @tpl = Template.new(@options[:tpl_dir] + "/index.html") + @tpl = DefaultTemplate.new(@options[:tpl_dir] + "/index.html", @options) end def write html = @tpl.apply({ - :title => @options[:title], - :footer => @options[:footer], :content => @config.to_html, }) File.open(@options[:output] + "/index.html", 'w') {|f| f.write(html) } end