homebrew-cask-versions/lib/hbc/dsl/base.rb
Paul Hinze 7856eec860 core: fix preflight/postflight casks
These were broken in the refactor to extract Hbc::Cask from Hbc.

fixes #9503
2015-02-09 09:28:41 -06:00

26 lines
410 B
Ruby

class Hbc::DSL::Base
def initialize(cask, command = Hbc::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.caskroom_path
end
def staged_path
caskroom_path.join(@cask.version.to_s)
end
end