Class: StartMeUp::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



14
15
16
17
18
19
20
21
# File 'lib/startmeup/generator.rb', line 14

def install
  if startmeup_files_already_exist?
    puts "StartMeUp files already installed, doing nothing."
  else
    install_files
    puts "StartMeUp files installed to #{install_path}/base"
  end
end

#removeObject



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

def remove
  if startmeup_files_already_exist?
    remove_startmeup_directory
    puts "StartMeUp was successfully removed."
  else
    puts "No existing StartMeUp installation. Doing nothing."
  end
end

#resetObject



24
25
26
27
28
29
30
31
32
# File 'lib/startmeup/generator.rb', line 24

def reset
  if startmeup_files_already_exist?
    remove_startmeup_directory
    install_files
    puts "StartMeUp files updated."
  else
    puts "No existing StartMeUp installation. Doing nothing."
  end
end

#versionObject



45
46
47
# File 'lib/startmeup/generator.rb', line 45

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