Retrieve the model and version of an Apple product based on the model id. Note: the model id is also referred to as the product code and the product id.
Special Note: At this time, only iOS product lookups are available. Feel free to fork and expand the catalog!
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install apple_models
device = AppleModels.find('iPad2,7') device.identifier # "iPad2,7" device.model # "iPad" device.version # "Mini" device.friendly_name # "iPad Mini" device.extended # "(Global)"
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request