Class: Kentucky::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



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

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

#updateObject



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

def update
  if kentucky_files_already_exist?
    remove_kentucky_directory
    create_kentucky_directory
    install_files
    puts "Kentucky files updated."
  else
    puts "No existing Kentucky installation. Doing nothing."
  end
end

#versionObject



35
36
37
# File 'lib/kentucky/generator.rb', line 35

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