Sha256: 852b4800c86b1ee22d7fea57bb86bdebe89fb71a8ab34ec4e0cdc509388aa586

Contents?: true

Size: 783 Bytes

Versions: 10

Compression:

Stored size: 783 Bytes

Contents

require 'bin_install/atom/package'

module BinInstall
  module Atom
    def self.install
      if installed?
        puts 'Atom already installed. Skipping Atom install.'.blue
      else
        Brew::Cask.install('atom')
      end
    end

    def self.install!
      if installed?
        puts 'Atom already installed. Skipping Atom install.'.blue
      else
        Brew::Cask.install!('atom')
      end
    end

    def self.ask
      return if installed?

      print 'Would you like to install Atom? [Y/n]: '
      install if Shell.default_yes?(gets.chomp)
    end

    def self.ask!
      print 'Would you like to install Atom? [Y/n]: '
      install! if Shell.default_yes?(gets.chomp)
    end

    def self.installed?
      Shell.executable_exists?('atom')
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bin_install-0.0.33 lib/bin_install/atom.rb
bin_install-0.0.32 lib/bin_install/atom.rb
bin_install-0.0.31 lib/bin_install/atom.rb
bin_install-0.0.30 lib/bin_install/atom.rb
bin_install-0.0.29 lib/bin_install/atom.rb
bin_install-0.0.28 lib/bin_install/atom.rb
bin_install-0.0.27 lib/bin_install/atom.rb
bin_install-0.0.26 lib/bin_install/atom.rb
bin_install-0.0.25 lib/bin_install/atom.rb
bin_install-0.0.24 lib/bin_install/atom.rb