class AutoPilot::HtmlConverter

Constants

DEFAULT_BLOG_FOLDER

Attributes

answer[R]
doc[R]
h1_tag[R]
question[R]

Public Class Methods

new(doc) click to toggle source
# File lib/auto_pilot/html_converter.rb, line 9
def initialize(doc)
  @h1_tag       = doc.title_html
  @question = doc.question_html
  @answer   = doc.answer_html
  make_folder_if_doesnt_exist
  write_file_to_disk(AutoPilot.configuration.folder, :html)
end

Private Instance Methods

delimiter() click to toggle source
# File lib/auto_pilot/html_converter.rb, line 23
def delimiter
  '<hr />'
end
html_template() click to toggle source
# File lib/auto_pilot/html_converter.rb, line 27
    def html_template
      @html ||= <<-EOS
        #{h1_tag}
        #{question}
        #{delimiter}
        #{answer}
      EOS
    end
to_html(html) click to toggle source
# File lib/auto_pilot/html_converter.rb, line 19
def to_html(html)
  html
end