Class: Redd::Object::PrivateMessage
- Includes:
- Thing::Inboxable
- Defined in:
- lib/redd/object/private_message.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
(also: #from, #to)
readonly
Returns the value of attribute author.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#body_html ⇒ Object
readonly
Returns the value of attribute body_html.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#distinguished ⇒ Object
readonly
Returns the value of attribute distinguished.
-
#first_message_name ⇒ Object
readonly
Returns the value of attribute first_message_name.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#subreddit ⇒ Object
readonly
Returns the value of attribute subreddit.
-
#was_comment ⇒ Object
readonly
Returns the value of attribute was_comment.
Attributes inherited from Thing
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Thing::Inboxable
#mark_as_read, #mark_as_unread, #reply
Methods inherited from Thing
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, #initialize
Constructor Details
This class inherits a constructor from Redd::Base
Instance Attribute Details
#author ⇒ Object (readonly) Also known as: from, to
Returns the value of attribute author.
20 21 22 |
# File 'lib/redd/object/private_message.rb', line 20 def @author end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/redd/object/private_message.rb', line 10 def body @body end |
#body_html ⇒ Object (readonly)
Returns the value of attribute body_html.
11 12 13 |
# File 'lib/redd/object/private_message.rb', line 11 def body_html @body_html end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
17 18 19 |
# File 'lib/redd/object/private_message.rb', line 17 def context @context end |
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
19 20 21 |
# File 'lib/redd/object/private_message.rb', line 19 def dest @dest end |
#distinguished ⇒ Object (readonly)
Returns the value of attribute distinguished.
14 15 16 |
# File 'lib/redd/object/private_message.rb', line 14 def distinguished @distinguished end |
#first_message_name ⇒ Object (readonly)
Returns the value of attribute first_message_name.
16 17 18 |
# File 'lib/redd/object/private_message.rb', line 16 def @first_message_name end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
13 14 15 |
# File 'lib/redd/object/private_message.rb', line 13 def parent_id @parent_id end |
#subreddit ⇒ Object (readonly)
Returns the value of attribute subreddit.
12 13 14 |
# File 'lib/redd/object/private_message.rb', line 12 def subreddit @subreddit end |
#was_comment ⇒ Object (readonly)
Returns the value of attribute was_comment.
15 16 17 |
# File 'lib/redd/object/private_message.rb', line 15 def was_comment @was_comment end |
Instance Method Details
#created ⇒ Object
25 26 27 |
# File 'lib/redd/object/private_message.rb', line 25 def created @created ||= Time.at(@attributes[:created_utc]) end |
#replies ⇒ Object
29 30 31 |
# File 'lib/redd/object/private_message.rb', line 29 def replies @replies ||= client.objects_from_listing(@attributes[:replies]) end |