Class: FrenchPress::Post::Image

Inherits:
Generic
  • Object
show all
Defined in:
lib/frenchpress/post/image.rb

Overview

Represents an image post.

Instance Attribute Summary

Attributes inherited from Generic

#file_name, #parent_blog

Instance Method Summary collapse

Methods inherited from Generic

#assign_variables, #derive_variables, #initialize, #render_as_quote, #render_with_tags, #tags

Constructor Details

This class inherits a constructor from FrenchPress::Post::Generic

Instance Method Details

#renderObject



7
8
9
10
# File 'lib/frenchpress/post/image.rb', line 7

def render
  "<img src=\"data:image/#{@file_type}, #{Base64.encode64(@content)}\" " \
    "class=\"img-post\" />"
end