Class: Smock::Generator

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

Instance Method Summary collapse

Instance Method Details

#installObject



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

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

#updateObject



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

def update
  if smock_files_already_exist?
    remove_smock_directory
    install_files
    puts "Smock files updated."
  else
    puts "No existing Smock installation. Doing nothing."
  end
end

#versionObject



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

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