aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/without_source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/without_source.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/without_source.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/without_source.rb b/Library/Homebrew/cask/lib/hbc/without_source.rb
new file mode 100644
index 000000000..6ed826e41
--- /dev/null
+++ b/Library/Homebrew/cask/lib/hbc/without_source.rb
@@ -0,0 +1,15 @@
+class Hbc::WithoutSource < Hbc::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