Class: Nuge::Clients::Grocer

Inherits:
Nuge::Client show all
Defined in:
lib/nuge/clients/grocer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Nuge::Client

#register, #unregister

Constructor Details

#initialize(options = {}) ⇒ Grocer

Returns a new instance of Grocer.



9
10
11
# File 'lib/nuge/clients/grocer.rb', line 9

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/nuge/clients/grocer.rb', line 7

def options
  @options
end

Instance Method Details

#push(ids, message) ⇒ Object



17
18
19
20
21
# File 'lib/nuge/clients/grocer.rb', line 17

def push(ids, message)
  notifications(ids, message).each do |notification|
    pusher.push(notification)
  end
end

#pusherObject



13
14
15
# File 'lib/nuge/clients/grocer.rb', line 13

def pusher
  @pusher ||= ::Grocer.pusher(options)
end