# frozen_string_literal: true module PhoneSites module GsmArena class Connection def self.get_manufacturers Manufacturer.all end def self.get_models(manufacturer) manufacturer.models end def self.get_description(arg) case arg when PhoneModel arg.info when String ModelInfoResponse.new.perform(URI.join(PhoneSites::GsmArena::BASE_URL, arg).to_s) else raise NotImplementedException end end def self.search(name) SearchResponse.new.perform(name) end end end end