Module: HubotGf::Worker::ClassMethods

Defined in:
lib/hubotgf/worker.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



34
35
36
# File 'lib/hubotgf/worker.rb', line 34

def self.extended(base)
  attr_accessor :command
end

Instance Method Details

#commandsObject



43
# File 'lib/hubotgf/worker.rb', line 43

def commands; @commands; end

#listen(hash = {}) ⇒ Object



38
39
40
41
# File 'lib/hubotgf/worker.rb', line 38

def listen(hash = {})
  @commands ||= CommandCollection.new(self)
  @commands << hash
end

#perform(*args) ⇒ Object

Resque entry



46
47
48
# File 'lib/hubotgf/worker.rb', line 46

def perform(*args)
  new.perform(*args)
end