Class: Rumblr::Post
Overview
for attribute details, see Tumblr’s documentation: www.tumblr.com/api
Direct Known Subclasses
AudioPost, ConversationPost, LinkPost, PhotoPost, QuotePost, RegularPost, VideoPost
Constant Summary collapse
- TYPES =
{ 'regular' => "RegularPost", 'photo' => "PhotoPost", 'quote' => "QuotePost", 'link' => "LinkPost", 'conversation' => "ConversationPost", 'video' => "VideoPost", 'audio' => "AudioPost" }
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#date_gmt ⇒ Object
readonly
Returns the value of attribute date_gmt.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#private ⇒ Object
readonly
Returns the value of attribute private.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#tumblelog ⇒ Object
Returns the value of attribute tumblelog.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#unix_timestamp ⇒ Object
readonly
Returns the value of attribute unix_timestamp.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #attribute_hash ⇒ Object
-
#initialize(attrs = {}) ⇒ Post
constructor
A new instance of Post.
- #private? ⇒ Boolean
- #public? ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ Post
Returns a new instance of Post.
20 21 22 23 |
# File 'lib/rumblr/post.rb', line 20 def initialize(attrs={}) @private = false super end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def date @date end |
#date_gmt ⇒ Object (readonly)
Returns the value of attribute date_gmt.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def date_gmt @date_gmt end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def id @id end |
#private ⇒ Object (readonly)
Returns the value of attribute private.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def private @private end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def @tags end |
#tumblelog ⇒ Object
Returns the value of attribute tumblelog.
18 19 20 |
# File 'lib/rumblr/post.rb', line 18 def tumblelog @tumblelog end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def type @type end |
#unix_timestamp ⇒ Object (readonly)
Returns the value of attribute unix_timestamp.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def @unix_timestamp end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
17 18 19 |
# File 'lib/rumblr/post.rb', line 17 def url @url end |
Instance Method Details
#attribute_hash ⇒ Object
33 34 35 |
# File 'lib/rumblr/post.rb', line 33 def attribute_hash {:date => date} end |
#private? ⇒ Boolean
25 26 27 |
# File 'lib/rumblr/post.rb', line 25 def private? @private end |
#public? ⇒ Boolean
29 30 31 |
# File 'lib/rumblr/post.rb', line 29 def public? !self.private? end |