Class: Verku::Exporter::HTML
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#base_name, #build_data, #config, #epub_file, export!, #git_branch, #handle_error, #html_file, #initialize, #name, #output_name, #read_content, #render_template, #source_list, #spawn_command, #tex_file, #ui
Constructor Details
This class inherits a constructor from Verku::Exporter::Base
Instance Method Details
#export! ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/verku/exporter/html.rb', line 4 def export! locals = config.merge({ "contents" => content }) locals['copyright'].gsub!("(C)", "©") output = render_template(root_dir.join("_templates/html/layout.erb"), locals) File.open(root_dir.join(html_file), 'w').write(output) true rescue Exception => error handle_error(error) false end |