Class: Pretzo

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

Class Method Summary collapse

Class Method Details

.installed?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/pretzo.rb', line 3

def installed?
  file_or_folder_exists?('/.zprezto')
end

.updateObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/pretzo.rb', line 7

def update
  check_update_message('Pretzo')

  result, _cmd = Open3.capture2e('cd ~/.zprezto && git pull && git submodule update --init --recursive')

  if result.include?('Already up-to-date')
    puts '  - Pretzo already up to date.'.colorize(:green)
  else
    puts '  - Updated Pretzo...'.colorize(:green)
  end

  break_output
end