Class: OneSignal::Buttons

Inherits:
Object
  • Object
show all
Defined in:
lib/onesignal/buttons.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(buttons: nil) ⇒ Buttons

Returns a new instance of Buttons.



7
8
9
# File 'lib/onesignal/buttons.rb', line 7

def initialize buttons: nil
  @buttons = buttons
end

Instance Attribute Details

#buttonsObject (readonly)

Returns the value of attribute buttons.



5
6
7
# File 'lib/onesignal/buttons.rb', line 5

def buttons
  @buttons
end

Instance Method Details

#as_json(options = nil) ⇒ Object



11
12
13
14
15
# File 'lib/onesignal/buttons.rb', line 11

def as_json options = nil
  {
    'buttons' => @buttons.as_json(options),
  }
end