Class: Redd::Objects::Thing
- Defined in:
- lib/redd/objects/thing.rb,
lib/redd/objects/thing/votable.rb,
lib/redd/objects/thing/editable.rb,
lib/redd/objects/thing/hideable.rb,
lib/redd/objects/thing/saveable.rb,
lib/redd/objects/thing/inboxable.rb,
lib/redd/objects/thing/messageable.rb,
lib/redd/objects/thing/moderatable.rb,
lib/redd/objects/thing/refreshable.rb
Overview
A reddit thing.
Direct Known Subclasses
Comment, PrivateMessage, Submission, Subreddit, User, WikiPage
Defined Under Namespace
Modules: Editable, Hideable, Inboxable, Messageable, Moderatable, Refreshable, Saveable, Votable
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Check for equality.
-
#fullname ⇒ String
The fullname of the thing.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Redd::Objects::Base
Instance Method Details
#==(other) ⇒ Boolean
Check for equality.
16 17 18 |
# File 'lib/redd/objects/thing.rb', line 16 def ==(other) other.is_a?(Thing) && fullname == other.fullname end |
#fullname ⇒ String
Returns The fullname of the thing.
21 22 23 |
# File 'lib/redd/objects/thing.rb', line 21 def fullname self[:name] || "#{kind}_#{id}" end |