Class: Fleakr::Objects::Comment
- Inherits:
-
Object
- Object
- Fleakr::Objects::Comment
- Includes:
- Support::Object
- Defined in:
- lib/fleakr/objects/comment.rb
Overview
Comment
This class represents a comment that can be associated with a single photo or an entire photoset.
Attributes
- id
-
The unique identifier for this comment
- url
-
The direct URL / permalink to reference this comment
- body
-
The comment itself - also available with
to_s
Instance Method Summary collapse
-
#author ⇒ Object
The user who supplied the comment.
-
#created_at ⇒ Object
When was this comment created?.
-
#to_s ⇒ Object
The contents of the comment - also available as
body
.
Methods included from Support::Object
Instance Method Details
#author ⇒ Object
The user who supplied the comment. See Fleakr::Objects::User for more information
30 31 32 |
# File 'lib/fleakr/objects/comment.rb', line 30 def @author ||= User.find_by_id() end |
#created_at ⇒ Object
When was this comment created?
36 37 38 |
# File 'lib/fleakr/objects/comment.rb', line 36 def created_at Time.at(created.to_i) end |
#to_s ⇒ Object
The contents of the comment - also available as body
42 43 44 |
# File 'lib/fleakr/objects/comment.rb', line 42 def to_s body end |