Class: Remark
- Inherits:
-
Object
- Object
- Remark
- Defined in:
- lib/remark.rb
Constant Summary collapse
- IGNORE =
%w(script head style)
Instance Method Summary collapse
-
#initialize(source) ⇒ Remark
constructor
A new instance of Remark.
- #to_markdown ⇒ Object
Constructor Details
#initialize(source) ⇒ Remark
Returns a new instance of Remark.
4 5 6 |
# File 'lib/remark.rb', line 4 def initialize(source) @doc = Hpricot(source) end |
Instance Method Details
#to_markdown ⇒ Object
8 9 10 |
# File 'lib/remark.rb', line 8 def to_markdown remark_children(@doc).join("\n\n") end |