mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
26 lines
425 B
Ruby
26 lines
425 B
Ruby
class Cask::DSL::Base
|
|
def initialize(cask, command = Cask::SystemCommand)
|
|
@cask = cask
|
|
@command = command
|
|
end
|
|
|
|
def system_command(executable, options = {})
|
|
@command.run!(executable, options)
|
|
end
|
|
|
|
def token
|
|
@cask.token
|
|
end
|
|
|
|
def version
|
|
@cask.version
|
|
end
|
|
|
|
def caskroom_path
|
|
@cask.class.caskroom.join(token)
|
|
end
|
|
|
|
def staged_path
|
|
caskroom_path.join(@cask.version.to_s)
|
|
end
|
|
end
|