Class: Add

Inherits:
Array
  • Object
show all
Defined in:
lib/add.rb

Instance Method Summary collapse

Constructor Details

#initializeAdd

Returns a new instance of Add.



3
4
5
6
7
8
9
# File 'lib/add.rb', line 3

def initialize
  if(Dir.exists?(".git"))
 if(`git status`.include?('untracked files present'))
   self.add 'git add -A -v'
 end
  end
end

Instance Method Details

#add(command) ⇒ Object



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

def add command
  self << command if(!include?(command))
end