class DocSmoosher::Generators::Builder
Constants
- OUTPUT
Public Class Methods
source_root()
click to toggle source
# File lib/doc_smoosher.rb, line 79 def self.source_root File.dirname(__FILE__) end
Public Instance Methods
build_api_html()
click to toggle source
# File lib/doc_smoosher.rb, line 88 def build_api_html api_name = File.basename(Dir.getwd) api_file = File.join(Dir.getwd, "#{api_name}.rb") # load api_file puts "opening: #{api_file}" File.open(api_file) do |f| instance_eval f.read end self.api = @api copy_file(File.join(TEMPLATES, 'html', 'bootstrap.min.css'), "output/html/bootstrap.min.css") copy_file(File.join(TEMPLATES, 'html', 'prettify.css'), "output/html/prettify.css") copy_file(File.join(TEMPLATES, 'html', 'prettify.js'), "output/html/prettify.js") copy_file(File.join(TEMPLATES, 'html', 'run_prettify.js'), "output/html/run_prettify.js") template(File.join(TEMPLATES, 'html', 'api.html.erb'), "output/html/#{api_name}.html") end
output()
click to toggle source
output directory
# File lib/doc_smoosher.rb, line 84 def output empty_directory OUTPUT end