Class: Brigit::GrabCommand
- Defined in:
- lib/brigit/commands/grab_command.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Methods included from Pretending
Methods included from Fallible
Methods included from Listable
Constructor Details
This class inherits a constructor from Brigit::Command
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/brigit/commands/grab_command.rb', line 8 def run super { |parser| add_pretend_to parser } matching_repositories.each do |name, location| if File.exists?(name) say "#{name}: Already exists, skipping..." else say "#{name}: Cloning from #{location} ..." sh "git clone '#{location}' '#{name}'" say "#{name}: Updating submodules ..." update name end end end |