homebrew-cask-versions/lib/cask/dsl/base.rb
2014-08-15 13:00:52 -03:00

26 lines
430 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 title
@cask.title
end
def version
@cask.version
end
def caskroom_path
@cask.class.caskroom.join(title)
end
def destination_path
caskroom_path.join(@cask.version.to_s)
end
end