Skip to content

Commit 9431381

Browse files
committed
Adds documentation for CLI#new and CLI#run
1 parent 4ed44cd commit 9431381

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/git_commander/cli.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ module GitCommander
99
class CLI
1010
attr_reader :output, :registry
1111

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
1215
def initialize(registry: GitCommander::Registry.new, output: STDOUT)
1316
@registry = registry
1417
@output = output
1518
end
1619

1720
# Runs a GitCommander command
21+
#
22+
# @param args [Array] (ARGV) a list of arguments to pass to the registered command
1823
def run(args = ARGV)
1924
arguments = Array(args)
2025
command = registry.find arguments.shift

0 commit comments

Comments
 (0)