lib/gem_leaves.rb
def load_config_file
    if @options[:ignore]
      @configuration = {'ignore' => {}}
    else
      if @options[:config_file].nil?
        cf = ['.gem_leaves.yml', File.join(find_home, '.gem_leaves.yml')]
        cf.each {|f| (@configuration = YAML.load_file(f); return) rescue nil}
        @configuration = {'ignore' => {}}
      else
        @configuration = YAML.load_file(@options[:config_file])
      end
    end
  end
# Looks for a YAML configuration file in:
# 
# 1. the PWD;
# 2. the user's home directory.
# 
# Optionally load a specific configuration file whose name has been set by
# the user.
Looks for a YAML configuration file in:
1. the PWD;
2. the user's home directory.

Optionally load a specific configuration file whose name has been set by
the user.
Looks for a YAML configuration file in : 1 . the PWD ; 2 . the user ' s home directory . Optionally load a specific configuration file whose name has been set by the user .
def load_config_file
    if @options[:ignore]
      @configuration = {'ignore' => {}}
    else
      if @options[:config_file].nil?
        cf = ['.gem_leaves.yml', File.join(find_home, '.gem_leaves.yml')]
        cf.each {|f| (@configuration = YAML.load_file(f); return) rescue nil}
        @configuration = {'ignore' => {}}
      else
        @configuration = YAML.load_file(@options[:config_file])
      end
    end
  end
def load_config_file if @options [ :ignore ] @configuration = { 'ignore' => { } } else if @options [ :config_file ] . nil? cf = [ '.gem_leaves.yml' , File . join ( find_home , '.gem_leaves.yml' ) ] cf . each { | f | ( @configuration = YAML . load_file ( f ) ; return ) rescue nil } @configuration = { 'ignore' => { } } else @configuration = YAML . load_file ( @options [ :config_file ] ) end end end
Looks for a YAML configuration file in:
1. the PWD;
2. the user's home directory.
Looks for a YAML configuration file in : 1 . the PWD ; 2 . the user ' s home directory .