Class: PushBuilder::APS

Inherits:
Object
  • Object
show all
Defined in:
lib/push_builder/aps.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#alertObject

Returns the value of attribute alert.



3
4
5
# File 'lib/push_builder/aps.rb', line 3

def alert
  @alert
end

#badgeObject

Returns the value of attribute badge.



3
4
5
# File 'lib/push_builder/aps.rb', line 3

def badge
  @badge
end

#soundObject

Returns the value of attribute sound.



3
4
5
# File 'lib/push_builder/aps.rb', line 3

def sound
  @sound
end

Instance Method Details

#to_hash(opts = {}) ⇒ Object



19
20
21
22
23
# File 'lib/push_builder/aps.rb', line 19

def to_hash(opts={})
  { badge: badge, alert: alert, sound: sound }.reject do |_,v|
    v.nil?
  end
end