Class: Redd::Models::MoreComments
- Defined in:
- lib/redd/models/more_comments.rb
Overview
An object that represents a bunch of comments that need to be expanded.
Instance Attribute Summary collapse
-
#children ⇒ Array<String>
readonly
The unexpanded comments.
-
#count ⇒ Integer
readonly
The comments under this object.
-
#depth ⇒ Integer
readonly
The depth.
-
#id ⇒ String
readonly
The object id.
-
#name ⇒ String
readonly
The object fullname.
-
#parent_id ⇒ String
readonly
The parent fullname.
Attributes inherited from Model
Instance Method Summary collapse
-
#expand(link:) ⇒ Listing<Comment, MoreComments>
Expand the object's children into a listing of Comments and MoreComments.
-
#to_a ⇒ Array<String>
(also: #to_ary)
An array representation of self.
Methods inherited from Model
Constructor Details
This class inherits a constructor from Redd::Models::Model
Instance Attribute Details
#children ⇒ Array<String> (readonly)
Returns the unexpanded comments.
44 |
# File 'lib/redd/models/more_comments.rb', line 44 property :children |
#count ⇒ Integer (readonly)
Returns the comments under this object.
24 |
# File 'lib/redd/models/more_comments.rb', line 24 property :count |
#depth ⇒ Integer (readonly)
Returns the depth.
40 |
# File 'lib/redd/models/more_comments.rb', line 40 property :depth |
#id ⇒ String (readonly)
Returns the object id.
32 |
# File 'lib/redd/models/more_comments.rb', line 32 property :id |
#name ⇒ String (readonly)
Returns the object fullname.
28 |
# File 'lib/redd/models/more_comments.rb', line 28 property :name |
#parent_id ⇒ String (readonly)
Returns the parent fullname.
36 |
# File 'lib/redd/models/more_comments.rb', line 36 property :parent_id |
Instance Method Details
#expand(link:) ⇒ Listing<Comment, MoreComments>
Expand the object's children into a listing of Comments and MoreComments.
12 13 14 |
# File 'lib/redd/models/more_comments.rb', line 12 def (link:) (link: link, lookup: {}) end |
#to_a ⇒ Array<String> Also known as: to_ary
Returns an array representation of self.
17 18 19 |
# File 'lib/redd/models/more_comments.rb', line 17 def to_a read_attribute(:children) end |