instance method
git
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
git(command = {})
Run a command in git.
Examples
git :init git :add => "this.file that.rb" git :add => "onefile.rb", :rm => "badfile.cxx"
Parameters
-
commandopt = {}
Source
# File railties/lib/rails_generator/generators/applications/app/template_runner.rb, line 129
def git(command = {})
in_root do
if command.is_a?(Symbol)
log 'running', "git #{command}"
Git.run(command.to_s)
else
command.each do |command, options|
log 'running', "git #{command} #{options}"
Git.run("#{command} #{options}")
end
end
end
end
Defined in railties/lib/rails_generator/generators/applications/app/template_runner.rb line 129
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::TemplateRunner