Class: Redd::Objects::Comment

Inherits:
Thing
  • Object
show all
Includes:
Thing::Editable, Thing::Inboxable, Thing::Moderatable, Thing::Refreshable, Thing::Saveable, Thing::Votable
Defined in:
lib/redd/objects/comment.rb

Overview

A comment that can be made on a link.

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods included from Thing::Votable

#clear_vote, #downvote, #upvote

Methods included from Thing::Saveable

#save, #unsave

Methods included from Thing::Refreshable

#refresh!

Methods included from Thing::Moderatable

#approve!, #distinguish, #ignore_reports, #remove!, #undistinguish, #unignore_reports

Methods included from Thing::Inboxable

#mark_as_read, #mark_as_unread, #reply

Methods included from Thing::Editable

#delete!, #edit

Methods inherited from Thing

#==, #fullname

Methods inherited from Base

alias_property, #initialize

Constructor Details

This class inherits a constructor from Redd::Objects::Base

Instance Method Details

#repliesListing

Returns The comment’s replies.

Returns:

  • (Listing)

    The comment’s replies.



17
18
19
# File 'lib/redd/objects/comment.rb', line 17

def replies
  @replies ||= (client.object_from_body(self[:replies]) || [])
end