homebrew-cask-versions/lib/hbc/without_source.rb
Paul Hinze 63d748e14c core: [refactor] separate Hbc::Cask from Hbc
Hbc is the namespace, Hbc::Cask is the object representing a Cask

One step on the path to reducing the surface area of the God-object
we've grown over the years. :)
2015-02-07 16:37:32 -06:00

18 lines
297 B
Ruby

class Hbc::WithoutSource < Hbc::Cask
def staged_path
caskroom_path.children.first
end
def initialize(sourcefile_path=nil)
@sourcefile_path = sourcefile_path
@token = sourcefile_path
end
def to_s
"#{token} (!)"
end
def installed?
caskroom_path.exist?
end
end