Class: PushBot::Platform
- Inherits:
-
Object
- Object
- PushBot::Platform
- Defined in:
- lib/push_bot/platform.rb
Constant Summary collapse
- VALUES =
%w(ios android)
Class Method Summary collapse
Class Method Details
.parse(*platforms) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/push_bot/platform.rb', line 5 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 |