cli_parser: allow hiding from man page.

This commit is contained in:
Mike McQuaid 2019-01-30 21:34:10 +00:00
parent a10ba20459
commit 1bdcd2001c
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -5,7 +5,7 @@ require "set"
module Homebrew
module CLI
class Parser
attr_reader :processed_options
attr_reader :processed_options, :hide_from_man_page
def self.parse(args = ARGV, &block)
new(&block).parse(args)
@ -29,6 +29,7 @@ module Homebrew
@conflicts = []
@processed_options = []
@desc_line_length = 43
@hide_from_man_page = false
instance_eval(&block)
post_initialize
end
@ -163,6 +164,10 @@ module Homebrew
end
end
def hide_from_man_page!
@hide_from_man_page = true
end
private
def enable_switch(*names)