Class: Bricolage::JobNet::JobNetRef
- Inherits:
-
Ref
- Object
- Ref
- Bricolage::JobNet::JobNetRef
show all
- Defined in:
- lib/bricolage/jobnet.rb
Instance Attribute Summary collapse
Attributes inherited from Ref
#location, #name, #subsystem
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Ref
#==, #dummy?, #hash, #inspect, parse
Constructor Details
#initialize(subsys, name, location) ⇒ JobNetRef
Returns a new instance of JobNetRef.
386
387
388
389
390
391
|
# File 'lib/bricolage/jobnet.rb', line 386
def initialize(subsys, name, location)
super
@jobnet = nil
@start = nil
@end = nil
end
|
Instance Attribute Details
#jobnet ⇒ Object
Returns the value of attribute jobnet.
393
394
395
|
# File 'lib/bricolage/jobnet.rb', line 393
def jobnet
@jobnet
end
|
Class Method Details
.for_job_path(path) ⇒ Object
377
378
379
380
381
382
383
384
|
# File 'lib/bricolage/jobnet.rb', line 377
def JobNetRef.for_job_path(path)
basename = path
until (ext = basename.extname).empty?
basename = basename.basename(ext)
end
new(path.parent.basename, basename, Location.dummy)
end
|
.for_path(path) ⇒ Object
373
374
375
|
# File 'lib/bricolage/jobnet.rb', line 373
def JobNetRef.for_path(path)
new(path.parent.basename, path.basename('.jobnet'), Location.dummy)
end
|
Instance Method Details
#end ⇒ Object
420
421
422
|
# File 'lib/bricolage/jobnet.rb', line 420
def end
@jobnet.end
end
|
#end_ref ⇒ Object
411
412
413
|
# File 'lib/bricolage/jobnet.rb', line 411
def end_ref
@end ||= JobRef.new(subsystem, "@#{name}@end", location)
end
|
#net? ⇒ Boolean
395
396
397
|
# File 'lib/bricolage/jobnet.rb', line 395
def net?
true
end
|
#relative_path ⇒ Object
403
404
405
|
# File 'lib/bricolage/jobnet.rb', line 403
def relative_path
"#{subsystem}/#{name}.jobnet"
end
|
#start ⇒ Object
416
417
418
|
# File 'lib/bricolage/jobnet.rb', line 416
def start
@jobnet.start
end
|
#start_ref ⇒ Object
407
408
409
|
# File 'lib/bricolage/jobnet.rb', line 407
def start_ref
@start ||= JobRef.new(subsystem, "@#{name}@start", location)
end
|
#to_s ⇒ Object
399
400
401
|
# File 'lib/bricolage/jobnet.rb', line 399
def to_s
'*' + super
end
|