module BinInstall::Atom

Public Class Methods

ask() click to toggle source
# File lib/bin_install/atom.rb, line 21
def self.ask
  return if installed?

  print 'Would you like to install Atom? [Y/n]: '
  install if Shell.default_yes?(gets.chomp)
end
ask!() click to toggle source
# File lib/bin_install/atom.rb, line 28
def self.ask!
  print 'Would you like to install Atom? [Y/n]: '
  install! if Shell.default_yes?(gets.chomp)
end
install() click to toggle source
# File lib/bin_install/atom.rb, line 5
def self.install
  if installed?
    puts 'Atom already installed. Skipping Atom install.'.blue
  else
    Brew::Cask.install('atom')
  end
end
install!() click to toggle source
# File lib/bin_install/atom.rb, line 13
def self.install!
  if installed?
    puts 'Atom already installed. Skipping Atom install.'.blue
  else
    Brew::Cask.install!('atom')
  end
end
installed?() click to toggle source
# File lib/bin_install/atom.rb, line 33
def self.installed?
  Shell.executable_exists?('atom')
end