Class: DownloadSolutions::Api::Reddit::Params
- Inherits:
-
Object
- Object
- DownloadSolutions::Api::Reddit::Params
- Defined in:
- lib/download_solutions/api/reddit/params.rb
Overview
A parameter object that is passed into each step within Reddit#get_comments.
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#day ⇒ Object
readonly
Returns the value of attribute day.
-
#initial_response ⇒ Object
Returns the value of attribute initial_response.
-
#languages ⇒ Object
readonly
Returns the value of attribute languages.
-
#megathread_path ⇒ Object
readonly
Returns the value of attribute megathread_path.
-
#more_childrens ⇒ Object
Returns the value of attribute more_childrens.
-
#original_comments ⇒ Object
Returns the value of attribute original_comments.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year:, day:, languages:, connection:) ⇒ Params
constructor
A new instance of Params.
Constructor Details
#initialize(year:, day:, languages:, connection:) ⇒ Params
Returns a new instance of Params.
12 13 14 15 16 17 18 19 |
# File 'lib/download_solutions/api/reddit/params.rb', line 12 def initialize(year:, day:, languages:, connection:) @year = year @day = day @languages = languages @connection = connection @megathread_path = build_megathread_path(year:, day:) @thread_id = "t3_#{megathread_id(year:, day:)}" end |
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments.
7 8 9 |
# File 'lib/download_solutions/api/reddit/params.rb', line 7 def comments @comments end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def connection @connection end |
#day ⇒ Object (readonly)
Returns the value of attribute day.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def day @day end |
#initial_response ⇒ Object
Returns the value of attribute initial_response.
7 8 9 |
# File 'lib/download_solutions/api/reddit/params.rb', line 7 def initial_response @initial_response end |
#languages ⇒ Object (readonly)
Returns the value of attribute languages.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def languages @languages end |
#megathread_path ⇒ Object (readonly)
Returns the value of attribute megathread_path.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def megathread_path @megathread_path end |
#more_childrens ⇒ Object
Returns the value of attribute more_childrens.
7 8 9 |
# File 'lib/download_solutions/api/reddit/params.rb', line 7 def more_childrens @more_childrens end |
#original_comments ⇒ Object
Returns the value of attribute original_comments.
7 8 9 |
# File 'lib/download_solutions/api/reddit/params.rb', line 7 def original_comments @original_comments end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def thread_id @thread_id end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
6 7 8 |
# File 'lib/download_solutions/api/reddit/params.rb', line 6 def year @year end |