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