Class: GitGuts::Open
- Inherits:
-
Thor::GitGroup
- Object
- Group
- Thor::GitGroup
- GitGuts::Open
- Defined in:
- lib/git_guts/open.rb
Constant Summary collapse
- WORKING_DIRECTORY =
Dir.getwd
Constants inherited from Thor::GitGroup
Instance Method Summary collapse
Methods inherited from Thor::GitGroup
Instance Method Details
#open ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/git_guts/open.rb', line 8 def open begin repo = Git.open(WORKING_DIRECTORY) puts repo.object(sha).contents rescue ArgumentError puts "Could open repository. Is it a valid git repository ?" rescue Git::GitExecuteError puts "Not a valid git object" end end |