Class: Tartan::Generator

Inherits:
Thor
  • Object
show all
Defined in:
lib/tartan/generator.rb

Instance Method Summary collapse

Instance Method Details

#installObject



11
12
13
14
15
16
17
18
# File 'lib/tartan/generator.rb', line 11

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

#updateObject



22
23
24
25
26
27
28
29
30
# File 'lib/tartan/generator.rb', line 22

def update
  if tartan_files_already_exist?
    remove_tartan_directory
    install_files
    puts 'Tartan files updated.'
  else
    puts 'No existing Tartan installation. Doing nothing.'
  end
end

#versionObject



33
34
35
# File 'lib/tartan/generator.rb', line 33

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