Class: Neat::Generator

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

Instance Method Summary collapse

Instance Method Details

#install ⇒ Object



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

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

#remove ⇒ Object



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

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

#update ⇒ Object



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

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

#version ⇒ Object



44
45
46
# File 'lib/neat/generator.rb', line 44

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