Class: RoCommands::PostCell

Inherits:
Object
  • Object
show all
Includes:
Celluloid, RoHtmlHandler
Defined in:
lib/ro_commands/post_handler.rb

Instance Method Summary collapse

Methods included from RoHtmlHandler

#doc

Instance Method Details

#handle_single(p) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/ro_commands/post_handler.rb', line 11

def handle_single(p)
  tag_name = File.dirname(p)
  title, content = if p.match(%r{\.md$})
                     handle_markdown(p)
                   elsif p.match(%r{(.+)\.html$})
                     handle_html(p)
                   end
  return {title: title, content: content}
  #post.tags.create name: tag_name
end