lib/cri/command_dsl.rb in cri-2.2.1 vs lib/cri/command_dsl.rb in cri-2.3.0
- old
+ new
@@ -77,9 +77,19 @@
# @return [void]
def usage(arg)
@command.usage = arg
end
+ # Marks the command as hidden. Hidden commands do not show up in the list of
+ # subcommands of the parent command, unless --verbose is passed (or
+ # `:verbose => true` is passed to the {Cri::Command#help} method). This can
+ # be used to mark commands as deprecated.
+ #
+ # @return [void]
+ def be_hidden
+ @command.hidden = true
+ end
+
# Adds a new option to the command. If a block is given, it will be
# executed when the option is successfully parsed.
#
# @param [String, Symbol] short The short option name
#