module Docklean::Conf

Public Instance Methods

configured?() click to toggle source
# File lib/docklean/conf.rb, line 33
def configured?()
    # return 1 if config exists
    if @conf then
        return true
    else
        return false
    end
end
get_conf(item) click to toggle source
# File lib/docklean/conf.rb, line 42
def get_conf(item)
    if self.configured?() then
        @conf[item]
    else
        raise Docklean::ErrorNoConfiguration
    end
end
read(file) click to toggle source
# File lib/docklean/conf.rb, line 24
def read(file)
    if (File.exists?(file)) then
        @conf = YAML.load_file(file)
        return @conf
    else
        raise Docklean::ErrorNoConfiguration
    end
end