Module: Ecstatic::Actions

Included in:
Command
Defined in:
lib/ecstatic/actions.rb

Instance Method Summary collapse

Instance Method Details

#git(commands = {}) ⇒ Object

Run a command in git.

git :init
git add: "this.file that.rb"
git add: "onefile.rb", rm: "badfile.cxx"


8
9
10
11
12
13
14
15
16
# File 'lib/ecstatic/actions.rb', line 8

def git(commands={})
  if commands.is_a?(Symbol)
    run "git #{commands}"
  else
    commands.each do |cmd, options|
      run "git #{cmd} #{options}"
    end
  end
end