Class: Firebase::Admin::Messaging::LightSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/firebase/admin/messaging/light_settings.rb

Overview

Represents settings to control notification LED that can be included in an AndroidNotification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color:, light_on_duration:, light_off_duration:) ⇒ LightSettings

Parameters:

  • color (String)

    The color of the LED in ‘#rrggbb` or `#rrggbbaa` format.

  • light_on_duration (Numeric)

    Along with #light_off_duration, defines the blink rate of LED flashes.

  • light_off_duration (Numeric)

    Along with #light_on_duration, defines the blink rate of LED flashes.



26
27
28
29
30
# File 'lib/firebase/admin/messaging/light_settings.rb', line 26

def initialize(color:, light_on_duration:, light_off_duration:)
  self.color = color
  self.light_on_duration = light_on_duration
  self.light_off_duration = light_off_duration
end

Instance Attribute Details

#colorString

Returns Sets color of the LED in ‘#rrggbb` or `#rrggbbaa` format.

Returns:

  • (String)

    Sets color of the LED in ‘#rrggbb` or `#rrggbbaa` format.



8
9
10
# File 'lib/firebase/admin/messaging/light_settings.rb', line 8

def color
  @color
end

#light_off_durationNumeric

Returns Along with #light_on_duration, defines the blink rate of LED flashes.

Returns:



16
17
18
# File 'lib/firebase/admin/messaging/light_settings.rb', line 16

def light_off_duration
  @light_off_duration
end

#light_on_durationNumeric

Returns Along with #light_off_duration, defines the blink rate of LED flashes.

Returns:



12
13
14
# File 'lib/firebase/admin/messaging/light_settings.rb', line 12

def light_on_duration
  @light_on_duration
end