Class: Homebrew::CLI::Parser::Subcommand Private

Inherits:
T::Struct
  • Object
show all
Defined in:
cli/parser.rb

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, aliases: [], description: nil, usage_banner: nil, default: false, named_args_type: nil, max_named_args: nil, min_named_args: nil, named_args_without_api: false) ⇒ void

Parameters:

  • name (String)
  • aliases (Array<String>) (defaults to: [])
  • description (String, nil) (defaults to: nil)
  • usage_banner (String, nil) (defaults to: nil)
  • default (Boolean) (defaults to: false)
  • named_args_type (ArgType) (defaults to: nil)
  • max_named_args (Integer, nil) (defaults to: nil)
  • min_named_args (Integer, nil) (defaults to: nil)
  • named_args_without_api (Boolean) (defaults to: false)


# File ''

const :name, String
const :aliases, T::Array[String], default: []
prop :description, T.nilable(String), default: nil
prop :usage_banner, T.nilable(String), default: nil
const :default, T::Boolean, default: false
prop :named_args_type, ArgType, default: nil
prop :max_named_args, T.nilable(Integer), default: nil
prop :min_named_args, T.nilable(Integer), default: nil
prop :named_args_without_api, T::Boolean, default: false

Instance Attribute Details

#aliasesArray<String> (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop aliases.

Returns:



# File ''

const :aliases, T::Array[String], default: []

#defaultBoolean (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop default.

Returns:

  • (Boolean)


# File ''

const :default, T::Boolean, default: false

#descriptionString?

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop description.

Returns:



# File ''

prop :description, T.nilable(String), default: nil

#max_named_argsInteger?

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop max_named_args.

Returns:



# File ''

prop :max_named_args, T.nilable(Integer), default: nil

#min_named_argsInteger?

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop min_named_args.

Returns:



# File ''

prop :min_named_args, T.nilable(Integer), default: nil

#nameString (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop name.

Returns:



# File ''

const :name, String

#named_args_typeArgType

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop named_args_type.

Returns:

  • (ArgType)


# File ''

prop :named_args_type, ArgType, default: nil

#named_args_without_apiBoolean

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop named_args_without_api.

Returns:

  • (Boolean)


# File ''

prop :named_args_without_api, T::Boolean, default: false

#usage_bannerString?

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns the value of prop usage_banner.

Returns:



# File ''

prop :usage_banner, T.nilable(String), default: nil