Class: Typedown2Blog::BlogFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/typedown2blog/formatters.rb

Direct Known Subclasses

HtmlDocument, HtmlTagsInText

Instance Method Summary collapse

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