lib/gem_leaves.rb
def parse_options(args)
    OptionParser.new('Usage: gem_leaves [OPTIONS]') do |p|
      p.separator ''
      p.on('-c', '--config-file=FILE', 'Load the named configuration file') {|v| @options[:config_file] = v}
      p.on('-C', '--color=COLOR', "Set the leaves' color in the DOT diagram") {|v| @options[:color] = v}
      p.on('-d', '--diagram', 'Generate a DOT diagram on stdout') {|v| @options[:diagram] = v}
      p.on('-g', '--generate-config-file=FILE',
        "Generate a new configuration file merging",
        "the leaves' list with the content of the",
        "old configuration file (if any)") {|v| @options[:new_config_file] = v}
      p.on('-i', '--ignore', 'Ignore every configuration file') {|v| @options[:ignore] = v}
      p.on('-p', '--pipe', 'Pipe Format (name --version ver)') {|v| @options[:pipe] = v}
      p.on('-r', '--reverse', "Reverse the edges in the DOT diagram") {|v| @options[:reverse] = v}
      p.parse(args)
    end
  end
# Parses the command line arguments.
Parses the command line arguments.
Parses the command line arguments .
def parse_options(args)
    OptionParser.new('Usage: gem_leaves [OPTIONS]') do |p|
      p.separator ''
      p.on('-c', '--config-file=FILE', 'Load the named configuration file') {|v| @options[:config_file] = v}
      p.on('-C', '--color=COLOR', "Set the leaves' color in the DOT diagram") {|v| @options[:color] = v}
      p.on('-d', '--diagram', 'Generate a DOT diagram on stdout') {|v| @options[:diagram] = v}
      p.on('-g', '--generate-config-file=FILE',
        "Generate a new configuration file merging",
        "the leaves' list with the content of the",
        "old configuration file (if any)") {|v| @options[:new_config_file] = v}
      p.on('-i', '--ignore', 'Ignore every configuration file') {|v| @options[:ignore] = v}
      p.on('-p', '--pipe', 'Pipe Format (name --version ver)') {|v| @options[:pipe] = v}
      p.on('-r', '--reverse', "Reverse the edges in the DOT diagram") {|v| @options[:reverse] = v}
      p.parse(args)
    end
  end
def parse_options ( args ) OptionParser . new ( 'Usage: gem_leaves [OPTIONS]' ) do | p | p . separator '' p . on ( '-c' , '--config-file=FILE' , 'Load the named configuration file' ) { | v | @options [ :config_file ] = v } p . on ( '-C' , '--color=COLOR' , "Set the leaves' color in the DOT diagram" ) { | v | @options [ :color ] = v } p . on ( '-d' , '--diagram' , 'Generate a DOT diagram on stdout' ) { | v | @options [ :diagram ] = v } p . on ( '-g' , '--generate-config-file=FILE' , "Generate a new configuration file merging" , "the leaves' list with the content of the" , "old configuration file (if any)" ) { | v | @options [ :new_config_file ] = v } p . on ( '-i' , '--ignore' , 'Ignore every configuration file' ) { | v | @options [ :ignore ] = v } p . on ( '-p' , '--pipe' , 'Pipe Format (name --version ver)' ) { | v | @options [ :pipe ] = v } p . on ( '-r' , '--reverse' , "Reverse the edges in the DOT diagram" ) { | v | @options [ :reverse ] = v } p . parse ( args ) end end
Parses the command line arguments.
Parses the command line arguments .
args