Class: Tumblr4r::Post
- Inherits:
-
Object
- Object
- Tumblr4r::Post
- Defined in:
- lib/tumblr4r.rb
Overview
Postおよびその子クラスは原則として単なるData Transfer Objectとし、 何かのロジックをこの中に実装はしない。
Constant Summary collapse
- @@default_generator =
nil
Instance Attribute Summary collapse
-
#bookmarklet ⇒ Object
Integer.
-
#date ⇒ Object
Integer.
-
#date_gmt ⇒ Object
Integer.
-
#format ⇒ Object
Integer.
-
#generator ⇒ Object
Integer.
-
#post_id ⇒ Object
Integer.
-
#private ⇒ Object
Integer.
-
#tags ⇒ Object
Integer.
-
#type ⇒ Object
Integer.
-
#unix_timestamp ⇒ Object
Integer.
-
#url ⇒ Object
Integer.
-
#url_with_slug ⇒ Object
Integer.
Instance Method Summary collapse
-
#initialize ⇒ Post
constructor
A new instance of Post.
- #params ⇒ Object
Constructor Details
#initialize ⇒ Post
Returns a new instance of Post.
179 180 181 182 |
# File 'lib/tumblr4r.rb', line 179 def initialize @generator = @@default_generator || "Tumblr4R" @tags = [] end |
Instance Attribute Details
#bookmarklet ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def bookmarklet @bookmarklet end |
#date ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def date @date end |
#date_gmt ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def date_gmt @date_gmt end |
#format ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def format @format end |
#generator ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def generator @generator end |
#post_id ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def post_id @post_id end |
#private ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def private @private end |
#tags ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def @tags end |
#type ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def type @type end |
#unix_timestamp ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def @unix_timestamp end |
#url ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def url @url end |
#url_with_slug ⇒ Object
Integer
163 164 165 |
# File 'lib/tumblr4r.rb', line 163 def url_with_slug @url_with_slug end |
Instance Method Details
#params ⇒ Object
184 185 186 187 188 189 190 191 192 |
# File 'lib/tumblr4r.rb', line 184 def params {"type" => @type, "generator" => @generator, "date" => @date, "private" => @private, "tags" => @tags.join(","), "format" => @format } end |