Class: Marksman::Writer
- Inherits:
-
Object
- Object
- Marksman::Writer
- Defined in:
- lib/marksman/writer.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(file, output_directory, theme = nil) ⇒ Writer
constructor
A new instance of Writer.
Constructor Details
#initialize(file, output_directory, theme = nil) ⇒ Writer
Returns a new instance of Writer.
4 5 6 7 8 |
# File 'lib/marksman/writer.rb', line 4 def initialize(file, output_directory, theme = nil) @file = file @output_directory = output_directory @theme = theme end |
Instance Method Details
#generate ⇒ Object
10 11 12 13 14 15 |
# File 'lib/marksman/writer.rb', line 10 def generate presentation = Marksman::Parser.new.parse(@file) presentation.theme = Theme.new(@theme) if @theme Marksman::Converter.new(presentation).write(@output_directory) presentation end |