Class: Prowler::DelayedJob

Inherits:
Object
  • Object
show all
Defined in:
lib/prowler/delayed_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ DelayedJob

:nodoc:

Yields:

  • (_self)

Yield Parameters:



6
7
8
# File 'lib/prowler/delayed_job.rb', line 6

def initialize #:nodoc:
  yield self if block_given?
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/prowler/delayed_job.rb', line 3

def api_key
  @api_key
end

#applicationObject

Returns the value of attribute application.



3
4
5
# File 'lib/prowler/delayed_job.rb', line 3

def application
  @application
end

#eventObject

Returns the value of attribute event.



4
5
6
# File 'lib/prowler/delayed_job.rb', line 4

def event
  @event
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/prowler/delayed_job.rb', line 4

def message
  @message
end

#priorityObject

Returns the value of attribute priority.



4
5
6
# File 'lib/prowler/delayed_job.rb', line 4

def priority
  @priority
end

#provider_keyObject

Returns the value of attribute provider_key.



3
4
5
# File 'lib/prowler/delayed_job.rb', line 3

def provider_key
  @provider_key
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/prowler/delayed_job.rb', line 4

def url
  @url
end

Instance Method Details

#optionsObject

:nodoc:



16
17
18
# File 'lib/prowler/delayed_job.rb', line 16

def options #:nodoc:
  { :priority => priority, :url => url, :delayed => false }
end

#performObject

Send notification



11
12
13
14
# File 'lib/prowler/delayed_job.rb', line 11

def perform
  prowler = Prowler.new(api_key, application, provider_key)
  prowler.notify(event, message, options)
end