class Profile::HomeBrew

Attributes

casks[R]
formulae[R]

Public Instance Methods

get_installed() click to toggle source
# File lib/bashman/homebrew.rb, line 9
def get_installed
    @installed = self.installed? if @installed.nil?

    if @installed
        @casks = self.get_casks
        @formulae = self.get_formulae
    end
end
installed?() click to toggle source
# File lib/bashman/homebrew.rb, line 18
def installed?
    path = Profile::HomeBrew.which('brew')
    @installed = path.empty? ? false : true
    @installed
end

Protected Instance Methods

get_casks() click to toggle source
# File lib/bashman/homebrew.rb, line 26
def get_casks
    %x(brew cask list).split("\n")
end
get_formulae() click to toggle source
# File lib/bashman/homebrew.rb, line 30
def get_formulae
    %x(brew list).split("\n")
end