Class: AuthKeyQuery
- Inherits:
-
Object
- Object
- AuthKeyQuery
- Includes:
- AuthProvider
- Defined in:
- lib/sideko_hacker_news.rb
Instance Attribute Summary collapse
-
#query_name ⇒ Object
Returns the value of attribute query_name.
-
#val ⇒ Object
Returns the value of attribute val.
Instance Method Summary collapse
- #add_auth(http_client, req_kwargs) ⇒ Object
-
#initialize(query_name: nil, val: nil) ⇒ AuthKeyQuery
constructor
A new instance of AuthKeyQuery.
Constructor Details
#initialize(query_name: nil, val: nil) ⇒ AuthKeyQuery
Returns a new instance of AuthKeyQuery.
73 74 75 76 |
# File 'lib/sideko_hacker_news.rb', line 73 def initialize(query_name: nil, val: nil) @query_name = query_name @val = val end |
Instance Attribute Details
#query_name ⇒ Object
Returns the value of attribute query_name.
71 72 73 |
# File 'lib/sideko_hacker_news.rb', line 71 def query_name @query_name end |
#val ⇒ Object
Returns the value of attribute val.
71 72 73 |
# File 'lib/sideko_hacker_news.rb', line 71 def val @val end |
Instance Method Details
#add_auth(http_client, req_kwargs) ⇒ Object
78 79 80 81 82 83 84 85 86 |
# File 'lib/sideko_hacker_news.rb', line 78 def add_auth(http_client, req_kwargs) if !val.nil? params = req_kwargs.fetch(:params, {}) params[query_name] = val req_kwargs[:params] = params end return http_client, req_kwargs end |