Class: GitWrapper::Commands::Add

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

Instance Attribute Summary

Attributes inherited from Git

#error, #location_folder, #output

Instance Method Summary collapse

Methods inherited from Git

#execute, #initialize, #result, #success?

Constructor Details

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

Instance Method Details

#allObject



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

def all
  @file = '-A'
  self
end

#commandObject



15
16
17
# File 'lib/git_wrapper/commands/add.rb', line 15

def command
  "add \"#{@file}\""
end

#file(file_name) ⇒ Object



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

def file(file_name)
  @file = to_relative_path(file_name)
  self
end