mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
14 lines
455 B
Ruby
14 lines
455 B
Ruby
class Cask::CLI::Cat < Cask::CLI::Base
|
|
def self.run(*arguments)
|
|
# only respects the first argument
|
|
raise CaskUnspecifiedError if arguments.empty?
|
|
cask_name = arguments.first.sub(/\.rb$/i, '')
|
|
cask_path = Cask.path(cask_name)
|
|
raise CaskUnavailableError, cask_name.to_s unless cask_path.exist?
|
|
puts File.open(cask_path) { |f| f.read }
|
|
end
|
|
|
|
def self.help
|
|
"dump raw source of the given Cask to the standard output"
|
|
end
|
|
end
|