Class: Arkaan::Notification
- Inherits:
-
Object
- Object
- Arkaan::Notification
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/notification.rb
Overview
A notification is a little something to warn a user that an action concerning him or her occurred.
Instance Attribute Summary collapse
-
#account ⇒ Arkaan::Account
The account concerned by this notification.
-
#data ⇒ Hash
The custom data that can be attached to this notification, for example for an invitation it can be the invited username.
-
#read ⇒ Boolean
TRUE if the notification has been read (seen by the user), FALSE otherwise.
-
#type ⇒ String
The type of notification this is supposed to be.
Instance Attribute Details
#account ⇒ Arkaan::Account
Returns the account concerned by this notification.
23 |
# File 'lib/arkaan/notification.rb', line 23 :account, class_name: 'Arkaan::Account', inverse_of: :notifications |
#data ⇒ Hash
Returns the custom data that can be attached to this notification, for example for an invitation it can be the invited username.
19 |
# File 'lib/arkaan/notification.rb', line 19 field :data, type: Hash, default: {} |
#read ⇒ Boolean
Returns TRUE if the notification has been read (seen by the user), FALSE otherwise.
15 |
# File 'lib/arkaan/notification.rb', line 15 field :read, type: Boolean, default: false |
#type ⇒ String
Returns the type of notification this is supposed to be. All types are custom and facultative.
12 |
# File 'lib/arkaan/notification.rb', line 12 field :type, type: String, default: 'NOTIFICATIONS.DEFAULT' |