Exception: Hbc::CaskConflictError

Inherits:
AbstractCaskErrorWithToken show all
Defined in:
Library/Homebrew/cask/lib/hbc/exceptions.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractCaskErrorWithToken

#reason, #token

Instance Method Summary collapse

Constructor Details

#initialize(token, conflicting_cask) ⇒ CaskConflictError

Returns a new instance of CaskConflictError



23
24
25
26
# File 'Library/Homebrew/cask/lib/hbc/exceptions.rb', line 23

def initialize(token, conflicting_cask)
  super(token)
  @conflicting_cask = conflicting_cask
end

Instance Attribute Details

#conflicting_caskObject (readonly)

Returns the value of attribute conflicting_cask



21
22
23
# File 'Library/Homebrew/cask/lib/hbc/exceptions.rb', line 21

def conflicting_cask
  @conflicting_cask
end

Instance Method Details

#to_sObject



28
29
30
# File 'Library/Homebrew/cask/lib/hbc/exceptions.rb', line 28

def to_s
  "Cask '#{token}' conflicts with '#{conflicting_cask}'."
end