Class: FIRE::Notification

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, data, options = {}) ⇒ Notification

Returns a new instance of Notification.



5
6
7
8
9
10
11
# File 'lib/pushmeup/fire/notification.rb', line 5

def initialize(token, data, options = {})
  self.device_token = token
  self.data = data

  @consolidationKey = options[:consolidationKey]
  @expiresAfter = options[:expiresAfter]
end

Instance Attribute Details

#consolidationKeyObject

Returns the value of attribute consolidationKey.



3
4
5
# File 'lib/pushmeup/fire/notification.rb', line 3

def consolidationKey
  @consolidationKey
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/pushmeup/fire/notification.rb', line 3

def data
  @data
end

#device_tokenObject

Returns the value of attribute device_token.



3
4
5
# File 'lib/pushmeup/fire/notification.rb', line 3

def device_token
  @device_token
end

#expiresAfterObject

Returns the value of attribute expiresAfter.



3
4
5
# File 'lib/pushmeup/fire/notification.rb', line 3

def expiresAfter
  @expiresAfter
end

Instance Method Details

#==(that) ⇒ Object



38
39
40
41
42
43
# File 'lib/pushmeup/fire/notification.rb', line 38

def ==(that)
  device_token == that.device_token &&
      data == that.data &&
      consolidationKey == that.consolidationKey &&
      expiresAfter == that.expiresAfter
end