Sha256: 9a4572e4f7e58ee3321d129b062752c56142e275cf1dfd546e7240ae2f5ec6f5

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

require 'apple_models/version'

module AppleModels
  @@catalog = {
      'iPhone1,1' => 'iPhone 2G',
      'iPhone1,2' => 'iPhone 3G',
      'iPhone2,1' => 'iPhone 3GS',
      'iPhone3,1' => 'iPhone 4',
      'iPhone3,2' => 'iPhone 4',      # CDMA Prototype
      'iPhone3,3' => 'iPhone 4',      # CDMA
      'iPhone4,1' => 'iPhone 4S',
      'iPhone5,1' => 'iPhone 5',
      'iPhone5,2' => 'iPhone 5',
      'iProd0,1'  => 'iPad',          # Prototype
      'iPad1,1'   => 'iPad',          # WiFi and WiFi + Cellular models use same product code
      'iPad2,1'   => 'iPad 2',        # WiFi
      'iPad2,2'   => 'iPad 2',        # WiFi + Cellular, GSM
      'iPad2,3'   => 'iPad 2',        # WiFi + Cellular, CDMA
      'iPad2,4'   => 'iPad 2',        # WiFi, unannounced internal chipset change of iPad2,1
      'iPad2,5'   => 'iPad Mini',     # WiFi
      'iPad2,6'   => 'iPad Mini',     # WiFi + Cellular
      'iPad2,7'   => 'iPad Mini',     # WiFi + Cellular, Verizon
      'iPad3,1'   => 'iPad 3',
      'iPad3,2'   => 'iPad 3',        # WiFi + Cellular, AT&T
      'iPad3,3'   => 'iPad 3',        # WiFi + Cellular, Verizon
      'iPad3,4'   => 'iPad 4',        # WiFi
      'iPad3,5'   => 'iPad 4',        # WiFi + Cellular, AT&T
      'iPad3,6'   => 'iPad 4',        # WiFi + Cellular, Verizon & Sprint
      'iPod1,1'   => 'iPod Touch 1G',
      'iPod2,1'   => 'iPod Touch 2G',
      'iPod2,2'   => 'iPod Touch 3G', # Prototype
      'iPod3,1'   => 'iPod Touch 3G',
      'iPod4,1'   => 'iPod Touch 4G',
      'iPod5,1'   => 'iPod Touch 5G'
    }
    
  def self.find(product_id)
    @@catalog[product_id]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apple_models-1.0.0 lib/apple_models.rb