Class: APNS::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/apns/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action_loc_keyObject

Returns the value of attribute action_loc_key.



4
5
6
# File 'lib/apns/notification.rb', line 4

def action_loc_key
  @action_loc_key
end

#alert_bodyObject

Returns the value of attribute alert_body.



4
5
6
# File 'lib/apns/notification.rb', line 4

def alert_body
  @alert_body
end

#badgeObject

Returns the value of attribute badge.



5
6
7
# File 'lib/apns/notification.rb', line 5

def badge
  @badge
end

#content_availableObject

Returns the value of attribute content_available.



7
8
9
# File 'lib/apns/notification.rb', line 7

def content_available
  @content_available
end

#custom_dataObject

Returns the value of attribute custom_data.



8
9
10
# File 'lib/apns/notification.rb', line 8

def custom_data
  @custom_data
end

#launch_imageObject

Returns the value of attribute launch_image.



4
5
6
# File 'lib/apns/notification.rb', line 4

def launch_image
  @launch_image
end

#loc_argsObject

Returns the value of attribute loc_args.



4
5
6
# File 'lib/apns/notification.rb', line 4

def loc_args
  @loc_args
end

#loc_keyObject

Returns the value of attribute loc_key.



4
5
6
# File 'lib/apns/notification.rb', line 4

def loc_key
  @loc_key
end

#soundObject

Returns the value of attribute sound.



6
7
8
# File 'lib/apns/notification.rb', line 6

def sound
  @sound
end

Instance Method Details

#to_hashObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/apns/notification.rb', line 10

def to_hash
  {
    :alert => {
      :body => self.alert_body,
      :action_loc_key => self.action_loc_key,
      :loc_key => self.loc_key,
      :loc_args => self.loc_args,
      :launch_image => self.launch_image
    },
    :badge => self.badge,
    :sound => self.sound,
    :content_available => self.content_available,
    :custom_data => self.custom_data
  }
end