Module: Config
- Defined in:
- lib/roll/library.rb
Class Method Summary collapse
-
.confdir(name) ⇒ Object
Return the path to the configuration directory.
-
.datadir(name, versionless = false) ⇒ Object
Return the path to the data directory associated with the given package name.
Class Method Details
.confdir(name) ⇒ Object
Return the path to the configuration directory.
448 449 450 451 452 453 454 |
# File 'lib/roll/library.rb', line 448 def self.confdir(name) if lib = Library.instance( name ) lib.confdir else File.join(CONFIG['datadir'], name) end end |
.datadir(name, versionless = false) ⇒ Object
Return the path to the data directory associated with the given package name. Normally this is just “#'datadir'/#package_name”, but may be modified by packages like RubyGems and Rolls to handle versioned data directories.
439 440 441 442 443 444 445 |
# File 'lib/roll/library.rb', line 439 def self.datadir(name, versionless=false) if lib = Library.instance( name ) lib.datadir( versionless ) else File.join(CONFIG['datadir'], name) end end |