Class: Pushbots::All
Overview
All class
Constant Summary
Constants inherited from Push
Push::PLATFORM_TYPE, Push::PLATFORM_TYPE_R, Push::STATUS
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#badge ⇒ Object
Returns the value of attribute badge.
-
#except_alias ⇒ Object
Returns the value of attribute except_alias.
-
#except_tags ⇒ Object
Returns the value of attribute except_tags.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#sound ⇒ Object
Returns the value of attribute sound.
-
#tags ⇒ Object
Returns the value of attribute tags.
Attributes inherited from Push
#message, #platform, #response, #status, #type
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(platforms, message, schedule, options = {}) ⇒ All
constructor
A new instance of All.
- #send ⇒ Object
Constructor Details
#initialize(platforms, message, schedule, options = {}) ⇒ All
Returns a new instance of All.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pushbots/all.rb', line 7 def initialize(platforms, , schedule, = {}) super(platforms, , :all) self.schedule = schedule self. = [:tags] self.sound = [:sound] self.badge = [:badge] self. = [:except_tags] self.device_alias = [:alias] self.except_alias = [:except_alias] self.payload = [:payload] end |
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def alias @alias end |
#badge ⇒ Object
Returns the value of attribute badge.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def badge @badge end |
#except_alias ⇒ Object
Returns the value of attribute except_alias.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def except_alias @except_alias end |
#except_tags ⇒ Object
Returns the value of attribute except_tags.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def @except_tags end |
#payload ⇒ Object
Returns the value of attribute payload.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def payload @payload end |
#schedule ⇒ Object
Returns the value of attribute schedule.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def schedule @schedule end |
#sound ⇒ Object
Returns the value of attribute sound.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def sound @sound end |
#tags ⇒ Object
Returns the value of attribute tags.
4 5 6 |
# File 'lib/pushbots/all.rb', line 4 def @tags end |
Instance Method Details
#body ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pushbots/all.rb', line 25 def body data = { platform: @platform, msg: , schedule: schedule } data[:tags] if data[:badge] if badge data[:alias] if device_alias data[:except_tags] if data[:payload] if payload data end |