module CLIUtils::Configuration

Configuration Class

Manages any configuration values and the flat YAML file into which they get stored.

Public Class Methods

included(k) click to toggle source

Methods


included method

Hook called when this module gets mixed in; extends the includer with the methods defined here. @param k The includer @return Void


# File lib/cliutils/configuration.rb, line 22
def self.included(k)
  k.extend(self)
end

Public Instance Methods

configuration() click to toggle source

configuration method

Singleton method to return (or initialize, if needed) a Configurator. @return Configurator


# File lib/cliutils/configuration.rb, line 33
def configuration
  @configuration ||= Configurator.new('~/.default-cliutils')
end
load_configuration(path) click to toggle source

#load_configuration method

Initializes a Configurator with the passed filepath. @param path The path to the config file @return Void


# File lib/cliutils/configuration.rb, line 44
def load_configuration(path)
  @configuration = Configurator.new(path)
end