Class: Workhorse::Daemon::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/workhorse/daemon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, &block) ⇒ Worker

Returns a new instance of Worker.



9
10
11
12
13
# File 'lib/workhorse/daemon.rb', line 9

def initialize(id, name, &block)
  @id = id
  @name = name
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



6
7
8
# File 'lib/workhorse/daemon.rb', line 6

def block
  @block
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/workhorse/daemon.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/workhorse/daemon.rb', line 5

def name
  @name
end

#pidObject

Returns the value of attribute pid.



7
8
9
# File 'lib/workhorse/daemon.rb', line 7

def pid
  @pid
end