lib/gem_leaves.rb
# Writes the new configuration file merging the optionally already loaded
# one with the leaves just found.
Writes the new configuration file merging the optionally already loaded
one with the leaves just found.
Writes the new configuration file merging the optionally already loaded one with the leaves just found .
def generate_config_file
    if @options[:new_config_file]
      @leaves.sort.each do |leaf|
        @configuration['ignore']["#{leaf.name}"] = "= #{leaf.version}"
      end
      File.open(@options[:new_config_file], 'w') do |out|
        YAML.dump(@configuration, out)
      end
    end
  end
def generate_config_file if @options [ :new_config_file ] @leaves . sort . each do | leaf | @configuration [ 'ignore' ] [ "#{leaf.name}" ] = "= #{leaf.version}" end File . open ( @options [ :new_config_file ] , 'w' ) do | out | YAML . dump ( @configuration , out ) end end end
Writes the new configuration file merging the optionally already loaded
one with the leaves just found.
Writes the new configuration file merging the optionally already loaded one with the leaves just found .