class Yapt::Comment
Attributes
raw[R]
Public Class Methods
find(story_id)
click to toggle source
# File lib/yapt/comment.rb, line 3 def self.find(story_id) results = Request.new("stories/#{story_id}/comments", {}, :get).result results.collect {|r| new(r) } end
new(data)
click to toggle source
# File lib/yapt/comment.rb, line 9 def initialize(data) @raw = data end
Public Instance Methods
commenter()
click to toggle source
# File lib/yapt/comment.rb, line 20 def commenter @commenter ||= Member.find(person_id) end
created_at_display()
click to toggle source
# File lib/yapt/comment.rb, line 24 def created_at_display time_display(created_at) end
time_display(time)
click to toggle source
# File lib/yapt/comment.rb, line 28 def time_display(time) Time.parse(time).strftime("%a %d %b %I:%M") end