class PushBot::Platform
Constants
- VALUES
Public Class Methods
parse(*platforms)
click to toggle source
Translate an array of :ios / :android into an array of integer strings
@param platforms any of ‘:ios` and `:android` @return
# File lib/push_bot/platform.rb, line 9
def self.parse(*platforms)
platforms = platforms.flatten.map! {|p| VALUES.index(p.to_s.downcase) }
raise(ArgumentError, 'Platform must be ios or android') if platforms.any?(&:nil?)
platforms.map!(&:to_s)
end