aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/container/naked.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/container/naked.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/naked.rb30
1 files changed, 17 insertions, 13 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/container/naked.rb b/Library/Homebrew/cask/lib/hbc/container/naked.rb
index 596f50789..375d62f7a 100644
--- a/Library/Homebrew/cask/lib/hbc/container/naked.rb
+++ b/Library/Homebrew/cask/lib/hbc/container/naked.rb
@@ -1,19 +1,23 @@
require "hbc/container/base"
-class Hbc::Container::Naked < Hbc::Container::Base
- # Either inherit from this class and override with self.me?(criteria),
- # or use this class directly as "container type: :naked",
- # in which case self.me? is not called.
- def self.me?(*)
- false
- end
+module Hbc
+ class Container
+ class Naked < Base
+ # Either inherit from this class and override with self.me?(criteria),
+ # or use this class directly as "container type: :naked",
+ # in which case self.me? is not called.
+ def self.me?(*)
+ false
+ end
- def extract
- @command.run!("/usr/bin/ditto", args: ["--", @path, @cask.staged_path.join(target_file)])
- end
+ def extract
+ @command.run!("/usr/bin/ditto", args: ["--", @path, @cask.staged_path.join(target_file)])
+ end
- def target_file
- return @path.basename if @nested
- URI.decode(File.basename(@cask.url.path))
+ def target_file
+ return @path.basename if @nested
+ URI.decode(File.basename(@cask.url.path))
+ end
+ end
end
end