Class: App42::Push::DeviceType

Inherits:
App42Response show all
Defined in:
lib/push/DeviceType.rb

Constant Summary collapse

ANDROID =
"ANDROID"
IOS =
"iOS"
WP7 =
"WP7"

Instance Attribute Summary

Attributes inherited from App42Response

#isResponseSuccess, #strResponse, #totalRecords

Instance Method Summary collapse

Instance Method Details

#enum(string) ⇒ Object

Sets the value of the DeviceType.

Parameters:

  • string
    • the string of DeviceType.



30
31
32
# File 'lib/push/DeviceType.rb', line 30

def enum(string)
  return DeviceType.const_get(string)
end

#isAvailable(string) ⇒ Object

Returns the value of the DeviceType.

Returns:

  • the value of DeviceType.



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/push/DeviceType.rb', line 40

def isAvailable(string)
  if(string == "ANDROID")
    return "ANDROID"
  elsif(string == "iOS")
    return "iOS"
  elsif(string == "WP7")
    return "WP7"
  elsif(string == "OTHER")
    return "OTHER";
  else
    return nil
  end
end