Method: Murdoc.generate_from_file
- Defined in:
- lib/murdoc.rb
.generate_from_file(input, output, options = {}) ⇒ Object
Generate a single file story
34 35 36 37 38 39 40 41 42 |
# File 'lib/murdoc.rb', line 34 def self.generate_from_file(input, output, = {}) = .merge() annotator = Annotator.from_file(input, nil) File.open(output, "w+") do |f| annotated_file = annotate(input, [:highlight], [:do_not_count_comment_lines]) f.puts Renderer.new([:template]).render(:annotated_file => annotated_file, :stylesheet => File.read([:stylesheet])) end end |