@@ -27,32 +27,44 @@ class Task < Rake::TaskLib
2727 # The file that the command_kit CLI is defined in.
2828 #
2929 # @return [String]
30+ #
31+ # @api private
3032 attr_reader :class_file
3133
3234 # The class name of the command_kit CLI.
3335 #
3436 # @return [String]
37+ #
38+ # @api private
3539 attr_reader :class_name
3640
3741 # The output file to write the shell completions to.
3842 #
3943 # @return [String]
44+ #
45+ # @api private
4046 attr_reader :output_file
4147
4248 # Optional input YAML file to read additional shell completions from.
4349 #
4450 # @return [String, nil]
51+ #
52+ # @api private
4553 attr_reader :input_file
4654
4755 # Specifies whether the shell completion logic should be wrapped in a
4856 # function.
4957 #
5058 # @return [Boolean]
59+ #
60+ # @api private
5161 attr_reader :wrap_function
5262
5363 # Optional function name to wrap the shell completions within.
5464 #
5565 # @return [String, nil]
66+ #
67+ # @api private
5668 attr_reader :function_name
5769
5870 #
@@ -73,6 +85,8 @@ class Task < Rake::TaskLib
7385 #
7486 # [completely examples]: https://github.com/DannyBen/completely?tab=readme-ov-file#using-the-completely-command-line
7587 #
88+ # @api public
89+ #
7690 def initialize ( class_file : ,
7791 class_name : ,
7892 output_file : ,
@@ -93,6 +107,8 @@ def initialize(class_file: ,
93107 #
94108 # Defines the `command_kit:completion` task.
95109 #
110+ # @api private
111+ #
96112 def define
97113 task ( @output_file ) do
98114 completions = Completely ::Completions . new ( completion_rules )
@@ -117,6 +133,8 @@ def define
117133 #
118134 # @return [Class]
119135 #
136+ # @api private
137+ #
120138 def load_class
121139 require ( @class_file )
122140 Object . const_get ( @class_name )
@@ -128,6 +146,8 @@ def load_class
128146 # @return [Hash]
129147 # The completion rules from the {#input_file}.
130148 #
149+ # @api private
150+ #
131151 def load_input_file
132152 YAML . load_file ( @input_file , aliases : true )
133153 end
@@ -143,6 +163,8 @@ def load_input_file
143163 #
144164 # @since 0.2.0
145165 #
166+ # @api private
167+ #
146168 def suggestion_for_argument ( arg )
147169 case arg
148170 when /\A FILE\z |_FILE\z / then '<file>'
@@ -164,6 +186,8 @@ def suggestion_for_argument(arg)
164186 # @return [Hash{String => Array<String>}]
165187 # The completion rules for the command class and any sub-commands.
166188 #
189+ # @api private
190+ #
167191 def completion_rules_for ( command_class )
168192 command_name = command_class . command_name
169193 completions = { command_name => [ ] }
@@ -228,6 +252,8 @@ def completion_rules_for(command_class)
228252 #
229253 # @return [Hash{String => Array<String>}]
230254 #
255+ # @api private
256+ #
231257 def completion_rules
232258 completion_rules = completion_rules_for ( load_class )
233259
0 commit comments