Class: PushesUs::Notification
- Inherits:
-
Object
- Object
- PushesUs::Notification
- Defined in:
- lib/pushesus.rb
Instance Attribute Summary collapse
-
#alert ⇒ Object
Returns the value of attribute alert.
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#network ⇒ Object
Returns the value of attribute network.
-
#sound ⇒ Object
Returns the value of attribute sound.
Instance Method Summary collapse
-
#initialize(network, identity, alert, sound = 'default') ⇒ Notification
constructor
A new instance of Notification.
- #send ⇒ Object
Constructor Details
#initialize(network, identity, alert, sound = 'default') ⇒ Notification
Returns a new instance of Notification.
16 17 18 |
# File 'lib/pushesus.rb', line 16 def initialize(network, identity, alert, sound='default') @network, @identity, @alert, @sound = network, identity, alert, sound end |
Instance Attribute Details
#alert ⇒ Object
Returns the value of attribute alert.
14 15 16 |
# File 'lib/pushesus.rb', line 14 def alert @alert end |
#identity ⇒ Object
Returns the value of attribute identity.
14 15 16 |
# File 'lib/pushesus.rb', line 14 def identity @identity end |
#network ⇒ Object
Returns the value of attribute network.
14 15 16 |
# File 'lib/pushesus.rb', line 14 def network @network end |
#sound ⇒ Object
Returns the value of attribute sound.
14 15 16 |
# File 'lib/pushesus.rb', line 14 def sound @sound end |
Instance Method Details
#send ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/pushesus.rb', line 20 def send PushesUs.post('/notifications.json', :query => { :notification => { :identity => identity, :network => network, :alert => alert, :sound => sound }}) end |