class Rbnotes::Conf
Holds the configuration settings. Each value of setting can be retrieved like a Hash object. Here is some examples.
conf = Rbnotes.conf type = conf[:repository_type] name = conf[:repository_name] base = conf[:repository_base]
Constants
- DIRNAME_COMMON_CONF
Name of the directory which is used to indicate to put configuration files. Many tools use this name as the role.
- DIRNAME_RBNOTES
Name of the directory indicates which belongs to “rbnotes”.
- FILENAME_CONF
Name of the file to store configuration settings.
Public Instance Methods
self[sym] → value
click to toggle source
Retrieves the value for the given key.
# File lib/rbnotes/conf.rb, line 69 def [](sym) mode = @conf[:run_mode] || :production value = @conf[sym] || DEFAULT_VALUES[sym] if [:repository_name].include?(sym) value += MODE_POSTFIX[mode] end value end