class Flickrie::Comment

Public Class Methods

new(hash, api_caller) click to toggle source
# File lib/flickrie/objects/comment.rb, line 30
def initialize(hash, api_caller)
  @hash = hash
  @api_caller = api_caller
end

Public Instance Methods

author() click to toggle source

@return [Flickrie::User]

# File lib/flickrie/objects/comment.rb, line 10
def author() @author ||= User.new(@hash["author"], @api_caller) end
content() click to toggle source

@return [String]

# File lib/flickrie/objects/comment.rb, line 19
def content() @hash["_content"] end
created_at() click to toggle source

@return [Time]

# File lib/flickrie/objects/comment.rb, line 13
  def created_at() Time.at(Integer(@hash["datecreate"])) rescue nil end

  # @return [String]
  def permalink() @hash["permalink"] end

  # @return [String]
  def content() @hash["_content"] end

  # @return [Flickrie::Photo]
  def photo() @photo ||= Photo.new({"id" => @hash["photo_id"]}, @api_caller) end
  # @return [Flickrie::Video]
  def video() @video ||= Video.new({"id" => @hash["photo_id"]}, @api_caller) end

  def to_s
    content
  end

  def initialize(hash, api_caller)
    @hash = hash
    @api_caller = api_caller
  end
end
id() click to toggle source

@return [String]

# File lib/flickrie/objects/comment.rb, line 7
def id() @hash["id"] end
photo() click to toggle source

@return [Flickrie::Photo]

# File lib/flickrie/objects/comment.rb, line 22
def photo() @photo ||= Photo.new({"id" => @hash["photo_id"]}, @api_caller) end
to_s() click to toggle source
# File lib/flickrie/objects/comment.rb, line 26
def to_s
  content
end
video() click to toggle source

@return [Flickrie::Video]

# File lib/flickrie/objects/comment.rb, line 24
def video() @video ||= Video.new({"id" => @hash["photo_id"]}, @api_caller) end