Class: SimpleTemplater::Hooks::GitRepository
- Defined in:
- lib/simple-templater/hooks/postprocess/git_repository.rb
Instance Attribute Summary
Attributes inherited from Hook
Instance Method Summary collapse
Methods inherited from Hook
find, hooks, inherited, #initialize, invoke, #key, #will_run?
Constructor Details
This class inherits a constructor from SimpleTemplater::Hooks::Hook
Instance Method Details
#question ⇒ Object
8 9 10 |
# File 'lib/simple-templater/hooks/postprocess/git_repository.rb', line 8 def question CLI.yes?("Do you want to initialize Git repozitory and do initial commit?") end |
#run ⇒ Object
12 13 14 15 16 |
# File 'lib/simple-templater/hooks/postprocess/git_repository.rb', line 12 def run sh "git init" sh "git add ." sh "git commit -a -m 'Initial import'" end |