Class: Redd::Models::Comment

Inherits:
LazyModel show all
Includes:
Gildable, Inboxable, Moderatable, Postable, Replyable
Defined in:
lib/redd/models/comment.rb

Overview

A comment.

Instance Attribute Summary

Attributes inherited from BasicModel

#client

Class Method Summary collapse

Methods included from Replyable

#reply

Methods included from Postable

#delete, #disable_inbox_replies, #downvote, #edit, #enable_inbox_replies, #hide, #save, #undo_vote, #unhide, #unsave, #upvote

Methods included from Moderatable

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

Methods included from Inboxable

#block, #mark_as_read, #mark_as_unread

Methods included from Gildable

#gild

Methods inherited from LazyModel

#force_load, #initialize, #method_missing, #respond_to_missing?, #to_h

Methods inherited from BasicModel

#initialize, #inspect, #method_missing, #respond_to_missing?, #to_ary, #to_h

Constructor Details

This class inherits a constructor from Redd::Models::LazyModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Redd::Models::LazyModel

Class Method Details

.from_id(client, id) ⇒ Comment

Create a Comment from its fullname.


28
29
30
# File 'lib/redd/models/comment.rb', line 28

def self.from_id(client, id)
  new(client, name: id)
end