Module: Applitools::Calabash::OsVersions::Android

Extended by:
Android
Included in:
Android
Defined in:
lib/applitools/calabash/os_versions.rb

Constant Summary collapse

API_TO_NAME =
{
  4 => 'Android 1',
  10 => 'Android 2',
  13 => 'Android 3',
  20 => 'Android 4',
  22 => 'Android 5',
  23 => 'Android 6',
  25 => 'Android 7',
  27 => 'Android 8'
}.freeze

Instance Method Summary collapse

Instance Method Details

#os_version(api_level) ⇒ Object



19
20
21
# File 'lib/applitools/calabash/os_versions.rb', line 19

def os_version(api_level)
  API_TO_NAME[API_TO_NAME.keys.select { |v| api_level.to_i >= v }.last] || 'Android'
end