Module: Kicker::Notification

Defined in:
lib/kicker/notification.rb

Overview

:nodoc:

Constant Summary collapse

TITLE =
'Kicker'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_bundle_identifierObject

Returns the value of attribute app_bundle_identifier.



8
9
10
# File 'lib/kicker/notification.rb', line 8

def app_bundle_identifier
  @app_bundle_identifier
end

.useObject Also known as: use?

Returns the value of attribute use.



8
9
10
# File 'lib/kicker/notification.rb', line 8

def use
  @use
end

Class Method Details

.notify(options) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/kicker/notification.rb', line 11

def notify(options)
  return unless use?

  unless message = options.delete(:message)
    raise "A notification requires a `:message'"
  end

  options = {
    :group    => Dir.pwd,
    :activate => app_bundle_identifier
  }.merge(options)

  Notify.notify(TITLE, message, options)
end