Class: Capistrano::Grove::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano-grove.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_key, options) ⇒ Client

Returns a new instance of Client.



10
11
12
# File 'lib/capistrano-grove.rb', line 10

def initialize(channel_key, options)
  @grove_client = ::Grove.new(channel_key, options)
end

Instance Attribute Details

#grove_clientObject

Returns the value of attribute grove_client.



8
9
10
# File 'lib/capistrano-grove.rb', line 8

def grove_client
  @grove_client
end

Instance Method Details

#notify(message) ⇒ Object

post message as a notification. Returns true om-success and false on-failure.



15
16
17
# File 'lib/capistrano-grove.rb', line 15

def notify(message)
  !( @grove_client.post(message).status >= 400 )
end