Class: ODisk::StatJob
- Inherits:
-
Opee::Job
- Object
- Opee::Job
- ODisk::StatJob
- Defined in:
- lib/odisk/statjob.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#mods ⇒ Object
readonly
Returns the value of attribute mods.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #add_mod(name) ⇒ Object
- #complete?(token) ⇒ Boolean
-
#initialize(path, digest) ⇒ StatJob
constructor
A new instance of StatJob.
- #key ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, digest) ⇒ StatJob
Returns a new instance of StatJob.
9 10 11 12 13 |
# File 'lib/odisk/statjob.rb', line 9 def initialize(path, digest) @path = path @digest = digest @mods = [] end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
7 8 9 |
# File 'lib/odisk/statjob.rb', line 7 def digest @digest end |
#mods ⇒ Object (readonly)
Returns the value of attribute mods.
6 7 8 |
# File 'lib/odisk/statjob.rb', line 6 def mods @mods end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/odisk/statjob.rb', line 5 def path @path end |
Instance Method Details
#add_mod(name) ⇒ Object
15 16 17 |
# File 'lib/odisk/statjob.rb', line 15 def add_mod(name) @mods << name end |
#complete?(token) ⇒ Boolean
23 24 25 |
# File 'lib/odisk/statjob.rb', line 23 def complete?(token) @mods.empty? end |
#key ⇒ Object
19 20 21 |
# File 'lib/odisk/statjob.rb', line 19 def key() @path end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/odisk/statjob.rb', line 27 def to_s() "<StatJob:#{@path} [#{@mods.join(',')}]>" end |