Class: NeonRAW::Objects::All
- Inherits:
-
Object
- Object
- NeonRAW::Objects::All
- Defined in:
- lib/NeonRAW/objects/all.rb
Overview
The object for /r/all.
Listings collapse
-
#comments(param = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#controversial(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#hot(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#new(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#old(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#rising(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
-
#top(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
Instance Method Summary collapse
-
#initialize(client) ⇒ All
constructor
A new instance of All.
Constructor Details
#initialize(client) ⇒ All
Returns a new instance of All.
5 6 7 |
# File 'lib/NeonRAW/objects/all.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#comments(param = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#controversial(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#hot(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#new(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#old(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#rising(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |
#top(params = { limit: 25 }) ⇒ NeonRAW::Objects::Listing
Fetches a listing from /r/all.
28 29 30 31 32 33 |
# File 'lib/NeonRAW/objects/all.rb', line 28 %w(hot rising top old new controversial comments).each do |type| define_method :"#{type}" do |params = { limit: 25 }| path = "/r/all/#{type}/.json" @client.send(:build_listing, path, params) end end |