Class: Fractor::Work
- Inherits:
-
Object
- Object
- Fractor::Work
- Defined in:
- lib/fractor/work.rb
Overview
Base class for defining work items. Contains the input data for a worker.
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(input) ⇒ Work
constructor
A new instance of Work.
- #to_s ⇒ Object
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
#input ⇒ Object (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_s ⇒ Object
13 14 15 |
# File 'lib/fractor/work.rb', line 13 def to_s "Work: #{@input}" end |