vendor/plugins/configatron/lib/configatron/store.rb
# Allows for the configuration of the system from a YAML file.
# Takes the path to the YAML file.  Also takes an optional parameter,
# <tt>:hash</tt>, that indicates a specific hash that should be
# loaded from the file. 
Allows for the configuration of the system from a YAML file.
Takes the path to the YAML file.  Also takes an optional parameter,
:hash, that indicates a specific hash that should be
loaded from the file.
Allows for the configuration of the system from a YAML file . Takes the path to the YAML file . Also takes an optional parameter : hash that indicates a specific hash that should be loaded from the file .
def configure_from_yaml(path, opts = {})
      begin
        yml = ::Yamler.load(path)
        yml = yml[opts[:hash]] unless opts[:hash].nil?
        configure_from_hash(yml)
      rescue Errno::ENOENT => e
        puts e.message
      end
    end
def configure_from_yaml ( path , opts = { } ) begin yml = :: Yamler . load ( path ) yml = yml [ opts [ :hash ] ] unless opts [ :hash ] . nil? configure_from_hash ( yml ) rescue Errno :: ENOENT => e puts e . message end end
Allows for the configuration of the system from a YAML file.
Allows for the configuration of the system from a YAML file .
path
<not_specific>
opts
<not_specific>