Class: Cask::Generator

Inherits:
Thor
  • Object
show all
Defined in:
lib/cask/engine.rb

Instance Method Summary collapse

Instance Method Details

#installObject



12
13
14
15
16
17
18
19
# File 'lib/cask/engine.rb', line 12

def install
  if cask_files_already_exist? && !options[:force]
    puts "Cask files already installed, doing nothing."
  else
    install_files
    puts "Cask files installed to #{install_path}/"
  end
end

#updateObject



23
24
25
26
27
28
29
30
31
# File 'lib/cask/engine.rb', line 23

def update
  if cask_files_already_exist?
    remove_cask_directory
    install_files
    puts "Cask files updated."
  else
    puts "No existing cask installation. Doing nothing."
  end
end

#versionObject



34
35
36
# File 'lib/cask/engine.rb', line 34

def version
  say "Cask #{Cask::VERSION}"
end