Class: Pressman::Builders::LatexBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/pressman/builders/latex_builder.rb

Instance Attribute Summary

Attributes inherited from Builder

#filename

Instance Method Summary collapse

Methods inherited from Builder

start

Constructor Details

#initializeLatexBuilder

Returns a new instance of LatexBuilder.



5
6
7
8
9
10
11
# File 'lib/pressman/builders/latex_builder.rb', line 5

def initialize
  File.delete("#{@@config['title']}.tex") if File.exist?("#{@@config['title']}.tex")
  Dir.glob("*/*.textile") do |file|
    @filename = File.basename(file, ".textile")
    File.open("#{@@config['title']}.tex", 'a') {|f| f.write(render("templates/layout.#{extension}.erb")) }
  end
end