Class: GitWrapper::Commands::Status

Inherits:
Git
  • Object
show all
Defined in:
lib/git_wrapper/commands/status.rb

Instance Attribute Summary

Attributes inherited from Git

#error, #location_folder, #output

Instance Method Summary collapse

Methods inherited from Git

#execute, #initialize, #success?

Constructor Details

This class inherits a constructor from GitWrapper::Commands::Git

Instance Method Details

#commandObject



5
6
7
# File 'lib/git_wrapper/commands/status.rb', line 5

def command
  'status --porcelain'
end

#resultObject



9
10
11
12
13
# File 'lib/git_wrapper/commands/status.rb', line 9

def result
  output.split(/\n/).map do |line|
    Results::StatusPorcelain.parse(line)
  end
end