Class: Fractor::Work

Inherits:
Object
  • Object
show all
Defined in:
lib/fractor/work.rb

Overview

Base class for defining work items. Contains the input data for a worker.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Work

Returns a new instance of Work.



9
10
11
# File 'lib/fractor/work.rb', line 9

def initialize(input)
  @input = input
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



7
8
9
# File 'lib/fractor/work.rb', line 7

def input
  @input
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/fractor/work.rb', line 13

def to_s
  "Work: #{@input}"
end