Class: Pressman::Builders::HtmlBuilder
- Defined in:
- lib/pressman/builders/html_builder.rb
Instance Attribute Summary
Attributes inherited from Builder
Instance Method Summary collapse
-
#initialize ⇒ HtmlBuilder
constructor
A new instance of HtmlBuilder.
Methods inherited from Builder
Constructor Details
#initialize ⇒ HtmlBuilder
Returns a new instance of HtmlBuilder.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/pressman/builders/html_builder.rb', line 5 def initialize Dir.mkdir(extension) unless File.exists?(extension) copy_assets Dir.glob("book/*.textile") do |file| @filename = File.basename(file, ".textile") File.open("#{extension}/#{@filename}.html", 'w') {|f| f.write(render("templates/layout.html.erb")) } end end |