Class: Anchorman::HtmlConverter
- Inherits:
-
Object
- Object
- Anchorman::HtmlConverter
- Defined in:
- lib/anchorman/html_converter.rb
Instance Method Summary collapse
- #filename ⇒ Object
- #html ⇒ Object
-
#initialize(options) ⇒ HtmlConverter
constructor
A new instance of HtmlConverter.
Constructor Details
#initialize(options) ⇒ HtmlConverter
Returns a new instance of HtmlConverter.
3 4 5 6 7 |
# File 'lib/anchorman/html_converter.rb', line 3 def initialize() @path = [:path] @converter = [:converter] @repo = [:repo] end |
Instance Method Details
#filename ⇒ Object
9 10 11 |
# File 'lib/anchorman/html_converter.rb', line 9 def filename "#{File.basename(@path)[0..-4]}.html" end |
#html ⇒ Object
13 14 15 16 17 |
# File 'lib/anchorman/html_converter.rb', line 13 def html @converter.markdown(File.read(@path), mode: 'gfm', context: @repo.gfm_context) end |