Class: Betters::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



15
16
17
18
19
20
21
22
# File 'lib/betters.rb', line 15

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

#removeObject



36
37
38
39
40
41
42
43
# File 'lib/betters.rb', line 36

def remove
  if betters_files_already_exist?
    remove_betters_directory
    puts "Betters was successfully removed."
  else
    puts "No existing Betters installation. Doing nothing."
  end
end

#resetObject



25
26
27
28
29
30
31
32
33
# File 'lib/betters.rb', line 25

def reset
  if betters_files_already_exist?
    remove_betters_directory
    install_files
    puts "Betters files updated."
  else
    puts "No existing Betters installations. Doing nothing."
  end
end

#versionObject



46
47
48
# File 'lib/betters.rb', line 46

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