Class: PlainDavid::Strategies::MarkdownStrategy
- Inherits:
-
Object
- Object
- PlainDavid::Strategies::MarkdownStrategy
- Defined in:
- lib/plain_david/strategies/markdown_strategy.rb
Instance Attribute Summary collapse
-
#html ⇒ Object
Returns the value of attribute html.
Instance Method Summary collapse
- #convert! ⇒ Object
-
#initialize(html) ⇒ MarkdownStrategy
constructor
A new instance of MarkdownStrategy.
Constructor Details
#initialize(html) ⇒ MarkdownStrategy
Returns a new instance of MarkdownStrategy.
8 9 10 |
# File 'lib/plain_david/strategies/markdown_strategy.rb', line 8 def initialize(html) @html = html end |
Instance Attribute Details
#html ⇒ Object
Returns the value of attribute html.
6 7 8 |
# File 'lib/plain_david/strategies/markdown_strategy.rb', line 6 def html @html end |
Instance Method Details
#convert! ⇒ Object
12 13 14 |
# File 'lib/plain_david/strategies/markdown_strategy.rb', line 12 def convert! HTMLPage.new(:contents => html).markdown! end |