Class: Apnotic::Notification
- Inherits:
-
AbstractNotification
- Object
- AbstractNotification
- Apnotic::Notification
- Defined in:
- lib/apnotic/notification.rb
Instance Attribute Summary collapse
-
#alert ⇒ Object
Returns the value of attribute alert.
-
#badge ⇒ Object
Returns the value of attribute badge.
-
#category ⇒ Object
Returns the value of attribute category.
-
#content_available ⇒ Object
Returns the value of attribute content_available.
-
#content_state ⇒ Object
Returns the value of attribute content_state.
-
#custom_payload ⇒ Object
Returns the value of attribute custom_payload.
-
#dismissal_date ⇒ Object
Returns the value of attribute dismissal_date.
-
#event ⇒ Object
Returns the value of attribute event.
-
#interruption_level ⇒ Object
Returns the value of attribute interruption_level.
-
#mutable_content ⇒ Object
Returns the value of attribute mutable_content.
-
#relevance_score ⇒ Object
Returns the value of attribute relevance_score.
-
#sound ⇒ Object
Returns the value of attribute sound.
-
#stale_date ⇒ Object
Returns the value of attribute stale_date.
-
#target_content_id ⇒ Object
Returns the value of attribute target_content_id.
-
#thread_id ⇒ Object
Returns the value of attribute thread_id.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#url_args ⇒ Object
Returns the value of attribute url_args.
Attributes inherited from AbstractNotification
#apns_collapse_id, #apns_id, #authorization, #expiration, #priority, #push_type, #token, #topic
Instance Method Summary collapse
Methods inherited from AbstractNotification
#authorization_header, #body, #initialize
Constructor Details
This class inherits a constructor from Apnotic::AbstractNotification
Instance Attribute Details
#alert ⇒ Object
Returns the value of attribute alert.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def alert @alert end |
#badge ⇒ Object
Returns the value of attribute badge.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def badge @badge end |
#category ⇒ Object
Returns the value of attribute category.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def category @category end |
#content_available ⇒ Object
Returns the value of attribute content_available.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def content_available @content_available end |
#content_state ⇒ Object
Returns the value of attribute content_state.
8 9 10 |
# File 'lib/apnotic/notification.rb', line 8 def content_state @content_state end |
#custom_payload ⇒ Object
Returns the value of attribute custom_payload.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def custom_payload @custom_payload end |
#dismissal_date ⇒ Object
Returns the value of attribute dismissal_date.
8 9 10 |
# File 'lib/apnotic/notification.rb', line 8 def dismissal_date @dismissal_date end |
#event ⇒ Object
Returns the value of attribute event.
8 9 10 |
# File 'lib/apnotic/notification.rb', line 8 def event @event end |
#interruption_level ⇒ Object
Returns the value of attribute interruption_level.
7 8 9 |
# File 'lib/apnotic/notification.rb', line 7 def interruption_level @interruption_level end |
#mutable_content ⇒ Object
Returns the value of attribute mutable_content.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def mutable_content @mutable_content end |
#relevance_score ⇒ Object
Returns the value of attribute relevance_score.
7 8 9 |
# File 'lib/apnotic/notification.rb', line 7 def relevance_score @relevance_score end |
#sound ⇒ Object
Returns the value of attribute sound.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def sound @sound end |
#stale_date ⇒ Object
Returns the value of attribute stale_date.
8 9 10 |
# File 'lib/apnotic/notification.rb', line 8 def stale_date @stale_date end |
#target_content_id ⇒ Object
Returns the value of attribute target_content_id.
7 8 9 |
# File 'lib/apnotic/notification.rb', line 7 def target_content_id @target_content_id end |
#thread_id ⇒ Object
Returns the value of attribute thread_id.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def thread_id @thread_id end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
8 9 10 |
# File 'lib/apnotic/notification.rb', line 8 def @timestamp end |
#url_args ⇒ Object
Returns the value of attribute url_args.
6 7 8 |
# File 'lib/apnotic/notification.rb', line 6 def url_args @url_args end |
Instance Method Details
#background_notification? ⇒ Boolean
10 11 12 |
# File 'lib/apnotic/notification.rb', line 10 def background_notification? aps.count == 1 && aps.key?('content-available') && aps['content-available'] == 1 end |