Class: OneSignal::Sounds
- Inherits:
-
Object
- Object
- OneSignal::Sounds
- Defined in:
- lib/onesignal/sounds.rb
Instance Attribute Summary collapse
-
#amazon ⇒ Object
readonly
Returns the value of attribute amazon.
-
#android ⇒ Object
readonly
Returns the value of attribute android.
-
#ios ⇒ Object
readonly
Returns the value of attribute ios.
-
#windows ⇒ Object
readonly
Returns the value of attribute windows.
Instance Method Summary collapse
- #as_json(options = nil) ⇒ Object
-
#initialize(ios: nil, android: nil, amazon: nil, windows: nil) ⇒ Sounds
constructor
A new instance of Sounds.
Constructor Details
#initialize(ios: nil, android: nil, amazon: nil, windows: nil) ⇒ Sounds
Returns a new instance of Sounds.
7 8 9 10 11 12 13 14 |
# File 'lib/onesignal/sounds.rb', line 7 def initialize ios: nil, android: nil, amazon: nil, windows: nil validate ios: ios, windows: windows @ios = ios @android = android @amazon = amazon @windows = windows end |
Instance Attribute Details
#amazon ⇒ Object (readonly)
Returns the value of attribute amazon.
5 6 7 |
# File 'lib/onesignal/sounds.rb', line 5 def amazon @amazon end |
#android ⇒ Object (readonly)
Returns the value of attribute android.
5 6 7 |
# File 'lib/onesignal/sounds.rb', line 5 def android @android end |
#ios ⇒ Object (readonly)
Returns the value of attribute ios.
5 6 7 |
# File 'lib/onesignal/sounds.rb', line 5 def ios @ios end |
#windows ⇒ Object (readonly)
Returns the value of attribute windows.
5 6 7 |
# File 'lib/onesignal/sounds.rb', line 5 def windows @windows end |
Instance Method Details
#as_json(options = nil) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/onesignal/sounds.rb', line 16 def as_json = nil { 'ios_sound' => @ios.as_json(), 'android_sound' => @android.as_json(), 'adm_sound' => @amazon.as_json(), 'wp_wns_sound' => @windows.as_json() } end |