lib/rulebow/cli.rb
# Parse command line arguments with just the prettiest
# little CLI parser there ever was.
Parse command line arguments with just the prettiest
little CLI parser there ever was.
Parse command line arguments with just the prettiest little CLI parser there ever was .
def cli_parse
      @command = nil
      cli @argv,
        "-R --rules"  => lambda{ @command = :list },
        "-H --help"   => lambda{ @command = :help },
        "-a --auto"   => method(:watch=),
        "-f --fresh"  => method(:fresh!),
        "-s --script" => method(:script=),
        "-D --debug"  => method(:debug!)
    end
def cli_parse @command = nil cli @argv , "-R --rules" => lambda { @command = :list } , "-H --help" => lambda { @command = :help } , "-a --auto" => method ( :watch= ) , "-f --fresh" => method ( :fresh! ) , "-s --script" => method ( :script= ) , "-D --debug" => method ( :debug! ) end
Parse command line arguments with just the prettiest
little CLI parser there ever was.
Parse command line arguments with just the prettiest little CLI parser there ever was .