class Fourchan::Kit::Post
Post should make it easy to use OpenStruct for posts in a thread.
Also make it possible to get the link for the image, if the post has one.
Public Class Methods
new(hash, board)
click to toggle source
Calls superclass method
# File lib/fourchan/kit/post.rb, line 10 def initialize(hash, board) super(hash) @board = board end
Public Instance Methods
image_link()
click to toggle source
Return an URL for the image (if user submitted an image).
@return [URL] the URL for the image.
# File lib/fourchan/kit/post.rb, line 19 def image_link "http://i.4cdn.org/#{@board}/#{self.tim}#{self.ext}" if self.tim end