Class: AutoPilot::HtmlConverter
- Inherits:
-
Object
- Object
- AutoPilot::HtmlConverter
- Includes:
- TemplateHelper
- Defined in:
- lib/auto_pilot/html_converter.rb
Constant Summary collapse
- DEFAULT_BLOG_FOLDER =
'./blog'
Instance Attribute Summary collapse
-
#answer ⇒ Object
readonly
Returns the value of attribute answer.
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#h1_tag ⇒ Object
readonly
Returns the value of attribute h1_tag.
-
#question ⇒ Object
readonly
Returns the value of attribute question.
Instance Method Summary collapse
-
#initialize(doc) ⇒ HtmlConverter
constructor
A new instance of HtmlConverter.
Methods included from TemplateHelper
#file_name, #make_folder_if_doesnt_exist, #parameterize, #write_file_to_disk
Constructor Details
#initialize(doc) ⇒ HtmlConverter
Returns a new instance of HtmlConverter.
9 10 11 12 13 14 15 |
# 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 |
Instance Attribute Details
#answer ⇒ Object (readonly)
Returns the value of attribute answer.
5 6 7 |
# File 'lib/auto_pilot/html_converter.rb', line 5 def answer @answer end |
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
5 6 7 |
# File 'lib/auto_pilot/html_converter.rb', line 5 def doc @doc end |
#h1_tag ⇒ Object (readonly)
Returns the value of attribute h1_tag.
5 6 7 |
# File 'lib/auto_pilot/html_converter.rb', line 5 def h1_tag @h1_tag end |
#question ⇒ Object (readonly)
Returns the value of attribute question.
5 6 7 |
# File 'lib/auto_pilot/html_converter.rb', line 5 def question @question end |