Class: Context::ContextStruct Private

Inherits:
Object
  • Object
show all
Defined in:
brew/Library/Homebrew/context.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Struct describing the current execution context.

Instance Method Summary collapse

Constructor Details

#initialize(debug: nil, quiet: nil, verbose: nil) ⇒ ContextStruct

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ContextStruct.



30
31
32
33
34
# File 'brew/Library/Homebrew/context.rb', line 30

def initialize(debug: nil, quiet: nil, verbose: nil)
  @debug = debug
  @quiet = quiet
  @verbose = verbose
end

Instance Method Details

#debug?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


36
37
38
# File 'brew/Library/Homebrew/context.rb', line 36

def debug?
  @debug == true
end

#quiet?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


40
41
42
# File 'brew/Library/Homebrew/context.rb', line 40

def quiet?
  @quiet == true
end

#verbose?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


44
45
46
# File 'brew/Library/Homebrew/context.rb', line 44

def verbose?
  @verbose == true
end