Class: HowLongToBeat::HTMLRequests::SearchInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/howlongtobeat/html_requests.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script_content) ⇒ SearchInfo

Returns a new instance of SearchInfo.



27
28
29
30
31
# File 'lib/howlongtobeat/html_requests.rb', line 27

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_keyObject

Returns the value of attribute api_key.



25
26
27
# File 'lib/howlongtobeat/html_requests.rb', line 25

def api_key
  @api_key
end

#search_urlObject

Returns the value of attribute search_url.



25
26
27
# File 'lib/howlongtobeat/html_requests.rb', line 25

def search_url
  @search_url
end