Class: Redd::Object::Listing
- Inherits:
-
Object
- Object
- Redd::Object::Listing
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/redd/object/listing.rb
Overview
A listing of various reddit things.
Instance Attribute Summary collapse
-
#after ⇒ Object
readonly
Returns the value of attribute after.
-
#before ⇒ Object
readonly
Returns the value of attribute before.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#things ⇒ Array
readonly
A list of things in the listing.
Instance Method Summary collapse
-
#initialize(listing) ⇒ Listing
constructor
A new instance of Listing.
Constructor Details
#initialize(listing) ⇒ Listing
Returns a new instance of Listing.
21 22 23 24 25 26 |
# File 'lib/redd/object/listing.rb', line 21 def initialize(listing) @kind = listing[:kind] @things = listing[:data][:children] @after = listing[:data][:after] @before = listing[:data][:before] end |
Instance Attribute Details
#after ⇒ Object (readonly)
Returns the value of attribute after.
18 19 20 |
# File 'lib/redd/object/listing.rb', line 18 def after @after end |
#before ⇒ Object (readonly)
Returns the value of attribute before.
19 20 21 |
# File 'lib/redd/object/listing.rb', line 19 def before @before end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
17 18 19 |
# File 'lib/redd/object/listing.rb', line 17 def kind @kind end |
#things ⇒ Array (readonly)
Returns A list of things in the listing.
15 16 17 |
# File 'lib/redd/object/listing.rb', line 15 def things @things end |