Class: Flight::Executable

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/flight/executable.rb

Instance Method Summary collapse

Instance Method Details

#generateObject



31
32
33
# File 'lib/flight/executable.rb', line 31

def generate
  template 'Brewfile', 'Brewfile'
end

#installObject



12
13
14
15
16
# File 'lib/flight/executable.rb', line 12

def install
  update_brew and
  brewfile.packages.each { |pkg| use pkg } and
  say("Your flight is complete!\nPackages have been installed to #{prefix}.")
end

#outdatedObject



24
25
26
27
28
# File 'lib/flight/executable.rb', line 24

def outdated
  update_brew and brewfile.packages.outdated.each do |pkg|
    say "Current #{pkg.name} is #{pkg.current}, you have #{pkg.version}"
  end
end

#updateObject



19
20
21
# File 'lib/flight/executable.rb', line 19

def update
  update_brew and brewfile.packages.outdated.each { |pkg| use pkg }
end