Class: ProductHunt::Post
- Inherits:
-
Object
- Object
- ProductHunt::Post
- Includes:
- Entity
- Defined in:
- lib/product_hunt/post.rb
Instance Method Summary collapse
Methods included from Entity
Instance Method Details
#comments(options = {}) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/product_hunt/post.rb', line 21 def comments( = {}) if != @comments_options @comments = @client.comments_for_post(self["id"], ) @comments_options = end @comments end |
#created_at ⇒ Object
5 6 7 |
# File 'lib/product_hunt/post.rb', line 5 def created_at Time.parse(self["created_at"]) end |
#day ⇒ Object
9 10 11 |
# File 'lib/product_hunt/post.rb', line 9 def day Time.parse(self["day"]).to_date end |
#votes(options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/product_hunt/post.rb', line 13 def votes( = {}) if != @votes_options @votes = @client.votes_for_post(self["id"], ) @votes_options = end @votes end |