Class: Cask::DSL::Caveats Private
- Defined in:
- cask/dsl/caveats.rb,
cask/dsl/caveats.rbi,
sorbet/rbi/dsl/cask/dsl/caveats.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
- #discontinued? ⇒ Boolean private
- #eval_caveats(&block) ⇒ void private
- #initialize(*args) ⇒ void constructor private
- #kext ⇒ Symbol private
-
#puts(*args) ⇒ Symbol
private
Override
puts
to collect caveats.
Methods inherited from Base
#appdir, #arch, #caskroom_path, #language, #method_missing, #staged_path, #system_command, #token, #version
Constructor Details
#initialize(*args) ⇒ void
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.
17 18 19 20 21 22 |
# File 'cask/dsl/caveats.rb', line 17 def initialize(*args) super @built_in_caveats = T.let({}, T::Hash[Symbol, String]) @custom_caveats = T.let([], T::Array[String]) @discontinued = T.let(false, T::Boolean) 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.
36 |
# File 'cask/dsl/caveats.rb', line 36 def discontinued? = @discontinued |
#eval_caveats(&block) ⇒ void
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.
This method returns an undefined value.
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 |
#kext ⇒ Symbol
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.
5 |
# File 'cask/dsl/caveats.rbi', line 5 def kext; end |
#puts(*args) ⇒ Symbol
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.
45 46 47 48 |
# File 'cask/dsl/caveats.rb', line 45 def puts(*args) @custom_caveats += args :built_in_caveat end |