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.



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_keyObject

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_urlObject

Returns the value of attribute search_url.



22
23
24
# File 'lib/howlongtobeat/html_requests.rb', line 22

def search_url
  @search_url
end