Class: HowLongToBeat::HTMLRequests::SearchInfo
- Inherits:
-
Object
- Object
- HowLongToBeat::HTMLRequests::SearchInfo
- Defined in:
- lib/howlongtobeat/html_requests.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#search_url ⇒ Object
Returns the value of attribute search_url.
Instance Method Summary collapse
-
#initialize(script_content) ⇒ SearchInfo
constructor
A new instance of SearchInfo.
Constructor Details
#initialize(script_content) ⇒ SearchInfo
Returns a new instance of SearchInfo.
24 25 26 27 28 |
# File 'lib/howlongtobeat/html_requests.rb', line 24 def initialize(script_content) @api_key = extract_api_from_script(script_content) @search_url = extract_search_url_script(script_content) @search_url = @search_url&.strip&.gsub(/^\/+|\/+$/, '') end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
22 23 24 |
# File 'lib/howlongtobeat/html_requests.rb', line 22 def api_key @api_key end |
#search_url ⇒ Object
Returns the value of attribute search_url.
22 23 24 |
# File 'lib/howlongtobeat/html_requests.rb', line 22 def search_url @search_url end |