Class: Marksman::Converter
- Inherits:
-
Object
- Object
- Marksman::Converter
- Defined in:
- lib/marksman/converter.rb
Instance Attribute Summary collapse
-
#presentation ⇒ Object
Returns the value of attribute presentation.
-
#theme ⇒ Object
Returns the value of attribute theme.
Instance Method Summary collapse
-
#initialize(presentation) ⇒ Converter
constructor
A new instance of Converter.
- #write(directory) ⇒ Object
Constructor Details
#initialize(presentation) ⇒ Converter
Returns a new instance of Converter.
9 10 11 |
# File 'lib/marksman/converter.rb', line 9 def initialize(presentation) @presentation = presentation end |
Instance Attribute Details
#presentation ⇒ Object
Returns the value of attribute presentation.
7 8 9 |
# File 'lib/marksman/converter.rb', line 7 def presentation @presentation end |
#theme ⇒ Object
Returns the value of attribute theme.
7 8 9 |
# File 'lib/marksman/converter.rb', line 7 def theme @theme end |
Instance Method Details
#write(directory) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/marksman/converter.rb', line 13 def write(directory) puts 'Generating HTML...' FileUtils.mkdir_p(directory) Dir.glob(@presentation.theme.path.join('**/*')).each do |file| if File.file? file copy_file(Pathname.new(file), directory) end end end |