Class: Neat::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



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

def install
  if neat_files_already_exist?
    puts "Neat files already installed, doing nothing."
  else
    install_files
    puts "Neat files installed to neat/"
  end
end

#removeObject



31
32
33
34
35
36
37
38
# File 'lib/neat/generator.rb', line 31

def remove
  if neat_files_already_exist?
    remove_neat_directory
    puts "Neat was successfully removed."
  else
    puts "No existing neat installation. Doing nothing."
  end
end

#updateObject



20
21
22
23
24
25
26
27
28
# File 'lib/neat/generator.rb', line 20

def update
  if neat_files_already_exist?
    remove_neat_directory
    install_files
    puts "Neat files updated."
  else
    puts "No existing neat installation. Doing nothing."
  end
end

#versionObject



41
42
43
# File 'lib/neat/generator.rb', line 41

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