Class: Typedown2Blog::BlogFormatter
- Defined in:
- lib/typedown2blog/formatters.rb
Direct Known Subclasses
Instance Method Summary collapse
- #format_body(typedown) ⇒ Object
-
#initialize(name = nil) ⇒ BlogFormatter
constructor
A new instance of BlogFormatter.
Constructor Details
#initialize(name = nil) ⇒ BlogFormatter
Returns a new instance of BlogFormatter.
4 5 6 |
# File 'lib/typedown2blog/formatters.rb', line 4 def initialize name = nil BlogPost.add_formatter(name || self.class.to_s, self) end |
Instance Method Details
#format_body(typedown) ⇒ Object
8 9 10 11 |
# File 'lib/typedown2blog/formatters.rb', line 8 def format_body typedown raise "Pleas subclass and override this method." [ "Subject", "Body", "mime/type" ] end |