homebrew-cask-versions/lib/hbc/container/naked.rb
Roland Walker 202d6019f8 Move all code under an Hbc:: namespace
* convert existing Cask:: namespace to Hbc::
* move Homebrew-fork code under Hbc::
* move freestanding classes such as Tty and TopologicalHash under Hbc::
* recast HOMEBREW_CASK_ constants as HBC_
* modify our Homebrew Formula for backward compatibility
* devscripts and dev docs
2015-01-02 07:27:03 -05:00

16 lines
454 B
Ruby

class Hbc::Container::Naked < Hbc::Container::Base
def self.me?(criteria)
# Either inherit from this class and override self.me?,
# or use this class directly as "container :type => :naked",
# in which case self.me? is not called.
false
end
def extract
@command.run!('/usr/bin/ditto', :args => ['--', @path, @cask.staged_path.join(target_file)])
end
def target_file
URI.decode(File.basename(@cask.url.path))
end
end