Class: Pastvu::CommentCollection
- Inherits:
-
Collection
- Object
- BasicResponse
- Collection
- Pastvu::CommentCollection
- Defined in:
- lib/pastvu/comment/comment_collection.rb
Instance Attribute Summary
Attributes inherited from BasicResponse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CommentCollection
constructor
A new instance of CommentCollection.
- #photo ⇒ Object
- #users ⇒ Object
Methods inherited from Collection
Methods inherited from BasicResponse
Constructor Details
#initialize(attributes) ⇒ CommentCollection
Returns a new instance of CommentCollection.
3 4 5 6 7 |
# File 'lib/pastvu/comment/comment_collection.rb', line 3 def initialize(attributes) super attributes @path = %w[result comments] @model = Comment end |
Instance Method Details
#photo ⇒ Object
14 15 16 |
# File 'lib/pastvu/comment/comment_collection.rb', line 14 def photo Pastvu.photo @hash["result"]["cid"] end |
#users ⇒ Object
9 10 11 12 |
# File 'lib/pastvu/comment/comment_collection.rb', line 9 def users @hash ||= self.to_hash @hash["result"]["users"] end |