Class: ChromeStoreSearch::AppParser

Inherits:
Object
  • Object
show all
Defined in:
lib/chrome_store_search/app_parser.rb

Class Method Summary collapse

Class Method Details

.parse(apps_json_body) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/chrome_store_search/app_parser.rb', line 8

def self.parse(apps_json_body)
  apps_json_array = JSON.parse(StringUtility.gsub_continuation_commas(apps_json_body[4..-1]))[1][1]
  apps = []
  apps_json_array.each do |app_item|
    apps << new_app_instance(app_item)
  end
  return apps
end