Exception: Cask::CaskQuarantineError Private
- Defined in:
- cask/exceptions.rb
Overview
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.
Error during quarantining of a file.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
private
-
#reason ⇒ Object
readonly
private
Instance Method Summary collapse
-
#initialize(path, reason) ⇒ CaskQuarantineError
constructor
private
A new instance of CaskQuarantineError.
-
#to_s ⇒ String
private
Constructor Details
#initialize(path, reason) ⇒ CaskQuarantineError
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 CaskQuarantineError.
190 191 192 193 194 195 |
# File 'cask/exceptions.rb', line 190 def initialize(path, reason) super() @path = path @reason = reason end |
Instance Attribute Details
#path ⇒ Object (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.
188 189 190 |
# File 'cask/exceptions.rb', line 188 def path @path end |
#reason ⇒ Object (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.
188 189 190 |
# File 'cask/exceptions.rb', line 188 def reason @reason end |
Instance Method Details
#to_s ⇒ String
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.
198 199 200 201 202 203 204 205 206 207 208 |
# File 'cask/exceptions.rb', line 198 def to_s s = +"Failed to quarantine #{path}." unless reason.empty? s << " Here's the reason:\n" s << Formatter.error(reason) s << "\n" unless reason.end_with?("\n") end s.freeze end |