Class: Firebase::Admin::Messaging::CriticalSound
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::CriticalSound
- Defined in:
- lib/firebase/admin/messaging/critical_sound.rb
Overview
Critical alert sound configuration that can be included in an APS
Instance Attribute Summary collapse
-
#critical ⇒ Boolean?
The critical alert flag.
-
#name ⇒ String
The name of a sound file in the app’s main bundle or in the ‘Library/Sounds` folder of the app’s container directory.
-
#volume ⇒ Float?
The volume for the critical alert’s sound.
Instance Method Summary collapse
-
#initialize(name: "default", critical: nil, volume: nil) ⇒ CriticalSound
constructor
Initializes a CriticalSound.
Constructor Details
#initialize(name: "default", critical: nil, volume: nil) ⇒ CriticalSound
Initializes a Firebase::Admin::Messaging::CriticalSound.
29 30 31 32 33 |
# File 'lib/firebase/admin/messaging/critical_sound.rb', line 29 def initialize(name: "default", critical: nil, volume: nil) self.name = name self.critical = critical self.volume = volume end |
Instance Attribute Details
#critical ⇒ Boolean?
Returns The critical alert flag. Set to ‘true` to enable the critical alert.
13 14 15 |
# File 'lib/firebase/admin/messaging/critical_sound.rb', line 13 def critical @critical end |
#name ⇒ String
Returns The name of a sound file in the app’s main bundle or in the ‘Library/Sounds` folder of the app’s container directory. Specify the string “default” to play the system sound.
9 10 11 |
# File 'lib/firebase/admin/messaging/critical_sound.rb', line 9 def name @name end |
#volume ⇒ Float?
Returns The volume for the critical alert’s sound. Must be a value between 0.0 (silent) and 1.0 (full volume).
17 18 19 |
# File 'lib/firebase/admin/messaging/critical_sound.rb', line 17 def volume @volume end |