Class: Bricolage::JobNet::JobRef

Inherits:
Ref
  • Object
show all
Defined in:
lib/bricolage/jobnet.rb

Instance Attribute Summary

Attributes inherited from Ref

#location, #name, #subsystem

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Ref

#==, #dummy?, #hash, #initialize, #inspect, parse, #to_s

Constructor Details

This class inherits a constructor from Bricolage::JobNet::Ref

Class Method Details

.for_path(path) ⇒ Object



391
392
393
# File 'lib/bricolage/jobnet.rb', line 391

def JobRef.for_path(path)
  new(path.parent.basename, JobRef.strip_exts(path), Location.dummy)
end

.strip_exts(path) ⇒ Object



395
396
397
398
399
400
401
402
# File 'lib/bricolage/jobnet.rb', line 395

def JobRef.strip_exts(path)
  basename = path
  # remove all extnames
  until (ext = basename.extname).empty?
    basename = basename.basename(ext)
  end
  basename
end

Instance Method Details

#net?Boolean



404
405
406
# File 'lib/bricolage/jobnet.rb', line 404

def net?
  false
end