lib/rake/toolkit_program/task_ext.rb
##
# Define argument parsing for a Rake::Task used as a command
#
# The block receives two arguments:
#
# 1.  a Rake::ToolkitProgram::CommandOptionParser (a subclass of
#     OptionParser)
# 2.  the argument accumulator object passed in as +into+
#
# When the subject task is invoked through Rake::ToolkitProgram.run,
# the parser configured in this block is run against the _remaining_
# arguments (after the command name).  The argument accumulator +into+
# will be available as Rake::ToolkitProgram.args instead of the default
# argument Array.
#
# Rake::ToolkitProgram::CommandOptionParser offers some useful extensions
# around positional parameters, since the Array containing the remaining
# arguments after parsing would be otherwise unavailable.
#
Define argument parsing for a Rake::Task used as a command
The block receives two arguments.

1.

When the subject task is invoked through Rake::ToolkitProgram.run,
the parser configured in this block is run against the _remaining_
arguments (after the command name).  The argument accumulator +into+
will be available as Rake::ToolkitProgram.args instead of the default
argument Array.

:ToolkitProgram::CommandOptionParser offers some useful extensions
around positional parameters, since the Array containing the remaining
arguments after parsing would be otherwise unavailable.
Define argument parsing for a Rake :: Task used as a command The block receives two arguments . 1 . When the subject task is invoked through Rake :: ToolkitProgram . run the parser configured in this block is run against the _remaining_ arguments ( after the command name ) . The argument accumulator + into + will be available as Rake :: ToolkitProgram . args instead of the default argument Array . : ToolkitProgram :: CommandOptionParser offers some useful extensions around positional parameters since the Array containing the remaining arguments after parsing would be otherwise unavailable .
def parse_args(into: ToolkitProgram.new_default_parsed_args {Hash.new})
        parser, new_args = CommandOptionParser.new(into), into
        yield parser, new_args
        @arg_parser = parser
        extend ArgParsingTask
        return self
      end
def parse_args ( into : ToolkitProgram . new_default_parsed_args { Hash . new } ) parser , new_args = CommandOptionParser . new ( into ) , into yield parser , new_args @arg_parser = parser extend ArgParsingTask return self end
Define argument parsing for a Rake::Task used as a command
The block receives two arguments:
Define argument parsing for a Rake :: Task used as a command The block receives two arguments :
into
<not_specific>
new_default_parsed_args
<not_specific>
new
<not_specific>