lib/Charu/CreateHtml.rb in Charu-0.0.9 vs lib/Charu/CreateHtml.rb in Charu-0.0.11
- old
+ new
@@ -23,22 +23,23 @@
end
def create_html()
p "pages.size " + @pages.size.to_s
@pages.each{|page|
- create_html = Charu::CreateHtml.new(page)
+ create_html = Charu::CreateHtml.new(page, @pages.size)
}
end
end
class CreateHtml
- attr_accessor :keyword, :css_theme_path, :link, :hiduke, :day, :title, :config
- def initialize(page)
+ attr_accessor :keyword, :css_theme_path, :link, :hiduke, :day, :title, :config, :page, :page_max
+ def initialize(page, page_max)
@config = Charu::Config.new()
+ @page_max = page_max
@page = page
@header = File.open("./CharuConfig/template/header.erb").read
@footer = File.open("./CharuConfig/template/footer.erb").read
@body = File.open("./CharuConfig/template/body.erb").read
@@ -120,6 +121,6 @@
@days.get_days.each{|day_name, title, html|
File.write(@config.www_html_out_path + @file_name, html)
}
end
end
-end
\ No newline at end of file
+end