Roll  Config

[Validate]
Generated with WebRI Redfish 1.2.1

Config

Constants

HOME
CONFIG_HOME

Location of user’s personal config directory.

CONFIG_DIRS

List of user shared system config directories.

WIN_PATTERNS

Public Class Methods

confdir(name) click to toggle source

Return the path to the configuration directory.

    # File lib/roll/config.rb, line 54
54:   def self.confdir(name)
55:     if lib = Roll::Library.instance(name)
56:       lib.confdir
57:     else
58:       File.join(CONFIG['confdir'], name)
59:     end
60:   end
datadir(name, versionless=false) click to toggle source

Return the path to the data directory associated with the given library name.

    # File lib/roll/config.rb, line 44
44:   def self.datadir(name, versionless=false)
45:     if lib = Roll::Library.instance(name)
46:       lib.datadir(versionless)
47:     else
48:       File.join(CONFIG['datadir'], name)
49:     end
50:   end
find_config(*glob) click to toggle source

Lookup configuration file.

    # File lib/roll/config.rb, line 64
64:   def self.find_config(*glob)
65:     flag = 0
66:     flag = (flag | glob.pop) while Fixnum === glob.last
67:     find = []
68:     [CONFIG_HOME, *CONFIG_DIRS].each do |dir|
69:       path = File.join(dir, *glob)
70:       if block_given?
71:         find.concat(Dir.glob(path, flag).select(&block))
72:       else
73:         find.concat(Dir.glob(path, flag))
74:       end
75:     end
76:     find
77:   end
win_platform?() click to toggle source

Is this a windows platform?

    # File lib/roll/config.rb, line 29
29:   def self.win_platform?
30:     @win_platform ||= (
31:       !!WIN_PATTERNS.find{ |r| RUBY_PLATFORM =~ r }
32:     )
33:   end

Disabled; run with --debug to generate this.