aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/without_source.rb
blob: 69131d5c7063daa1fb6704707210d92334d17a72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Hbc
  class WithoutSource < Cask
    # Override from `Hbc::DSL` because we don't have a cask source file to work
    # with, so we don't know the cask's `version`.
    def staged_path
      (caskroom_path.children - [metadata_master_container_path]).first
    end

    def to_s
      "#{token} (!)"
    end

    def installed?
      caskroom_path.exist?
    end
  end
end