Class: Saffron::Installer

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/saffron/installer.rb

Instance Method Summary collapse

Instance Method Details

#installObject



12
13
14
15
16
17
18
19
# File 'lib/saffron/installer.rb', line 12

def install
  unless File.directory? set_destination
    install_saffron
    puts "Saffron succesfully installed in #{@destination}/"
  else
    puts "Saffron already exists."
  end
end

#updateObject



23
24
25
26
27
28
29
30
31
# File 'lib/saffron/installer.rb', line 23

def update
  if File.directory? set_destination
    remove_saffron
    install_saffron
    puts "Saffron succesfully updated in #{@destination}/"
  else
    puts "Saffron not found. No updates occured."
  end
end

#versionObject



34
35
36
# File 'lib/saffron/installer.rb', line 34

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