lib/android/devices.rb
def load_devices(rows)
        @devices = rows.each_with_object({}) do |row, devices|
          manufacturer, marketing_name, _, model = row

          next unless model && manufacturer

          devices[cache_key(model, manufacturer)] = (marketing_name || model)
        end
      end
# Memoizes the device list on first call
# @return [Hash] Hash with the devices
#
# @note has to be called before calling display_name or manufacturer_name
#   to initialize caches
# TODO: rename this to `initialize` when releasing a major version
Memoizes the device list on first call
Memoizes the device list on first call
def load_devices(rows)
        @devices = rows.each_with_object({}) do |row, devices|
          manufacturer, marketing_name, _, model = row
          next unless model && manufacturer
          devices[cache_key(model, manufacturer)] = (marketing_name || model)
        end
      end
def load_devices ( rows ) @devices = rows . each_with_object ( { } ) do | row , devices | manufacturer , marketing_name , _ , model = row next unless model && manufacturer devices [ cache_key ( model , manufacturer ) ] = ( marketing_name || model ) end end
Memoizes the device list on first call
Memoizes the device list on first call
Hash with the devices
Hash with the devices
Hash
rows
note
has to be called before calling display_name or manufacturer_name to initialize caches TODO: rename this to `initialize` when releasing a major version
has to be called before calling display_name or manufacturer_name to initialize caches TODO : rename this to ` initialize ` when releasing a major version