Module: Murdoc
- Defined in:
- lib/murdoc/annotator.rb,
lib/murdoc.rb,
lib/murdoc/formatter.rb,
lib/murdoc/paragraph.rb,
lib/murdoc/languages/ruby.rb,
lib/murdoc/languages/javascript.rb
Overview
Javascript language module
Defined Under Namespace
Modules: Languages Classes: Annotator, Formatter, Paragraph
Class Method Summary collapse
Class Method Details
.default_options ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/murdoc.rb', line 21 def self. markup_dir = File.dirname(__FILE__)+ "/../markup" @@options ||= { :template => "#{markup_dir}/template.haml", :stylesheet => "#{markup_dir}/stylesheet.css" } end |
.generate_from_file(input, output, options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/murdoc.rb', line 13 def self.generate_from_file(input, output, = {}) = .merge() annotator = Annotator.from_file(input, nil, ) File.open(output, "w+") do |f| f.puts Formatter.new([:template]).render(:paragraphs => annotator.paragraphs, :stylesheet => File.read([:stylesheet])) end end |