Class: Verne::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



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

def install
  if verne_files_already_exist? and !options[:force]
    puts "Verne files already installed. No action taken."
  else
    install_files
    puts "Verne files installed to #{install_path}/"
  end
end

#removeObject



34
35
36
37
38
39
40
41
# File 'lib/verne/generator.rb', line 34

def remove
  if verne_files_already_exist?
    remove_verne_directory
    puts "Verne was successfully removed."
  else
    puts "No existing verne installation. No action taken."
  end
end

#updateObject



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

def update
  if verne_files_already_exist?
    remove_verne_directory
    install_files
    puts "Verne files updated."
  else
    puts "No existing Verne installation. No action taken."
  end
end