class Rprompt::GitNumbers

Public Instance Methods

numberOfFiles() click to toggle source

@return [Integer] number of files returned by a git command

# File lib/rprompt.rb, line 30
def numberOfFiles
        commandResult.split(/\r?\n/).count
end
show() click to toggle source

@return [String] terminal representation of the number of files

# File lib/rprompt.rb, line 35
def show
        numberOfFiles != 0 ? termShow({:color => color, :symbol => symbol, :content => numberOfFiles}) : ''
end