Class: Cask::DSL::Caveats Private

Inherits:
Base show all
Extended by:
Attrable
Defined in:
cask/dsl/caveats.rb,
cask/dsl/caveats.rbi,
sorbet/rbi/parlour.rbi

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 Method Summary collapse

Methods included from Attrable

attr_predicate, attr_rw

Methods inherited from Base

#method_missing, #system_command

Constructor Details

#initialize(*args) ⇒ Caveats

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 a new instance of Caveats.



22
23
24
25
26
27
# File 'cask/dsl/caveats.rb', line 22

def initialize(*args)
  super(*args)
  @built_in_caveats = {}
  @custom_caveats = []
  @discontinued = false
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Cask::DSL::Base

Instance Method Details

#discontinued?Boolean

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:

  • (Boolean)


357
# File 'sorbet/rbi/parlour.rbi', line 357

def discontinued?; end

#eval_caveats(&block) ⇒ Object

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.



51
52
53
54
55
56
57
# File 'cask/dsl/caveats.rb', line 51

def eval_caveats(&block)
  result = instance_eval(&block)
  return unless result
  return if result == :built_in_caveat

  @custom_caveats << result.to_s.sub(/\s*\Z/, "\n")
end

#kextSymbol

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:



5
# File 'cask/dsl/caveats.rbi', line 5

def kext; end

#puts(*args) ⇒ Object

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.

Override puts to collect caveats.



46
47
48
49
# File 'cask/dsl/caveats.rb', line 46

def puts(*args)
  @custom_caveats += args
  :built_in_caveat
end