We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed44cd commit 9431381Copy full SHA for 9431381
lib/git_commander/cli.rb
@@ -9,12 +9,17 @@ module GitCommander
9
class CLI
10
attr_reader :output, :registry
11
12
+ # @param registry [GitCommander::Registry] (GitCommander::Registry.new) the
13
+ # command registry to use for matching available commands
14
+ # @param output [IO] (STDOUT) the IO object you want to use to send output to when running commands
15
def initialize(registry: GitCommander::Registry.new, output: STDOUT)
16
@registry = registry
17
@output = output
18
end
19
20
# Runs a GitCommander command
21
+ #
22
+ # @param args [Array] (ARGV) a list of arguments to pass to the registered command
23
def run(args = ARGV)
24
arguments = Array(args)
25
command = registry.find arguments.shift
0 commit comments