Exception: MiniGit::GitError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- MiniGit::GitError
- Defined in:
- lib/minigit.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(command, status, info = {}) ⇒ GitError
constructor
A new instance of GitError.
Constructor Details
#initialize(command, status, info = {}) ⇒ GitError
Returns a new instance of GitError.
31 32 33 34 35 36 |
# File 'lib/minigit.rb', line 31 def initialize(command, status, info={}) @status = status.dup rescue status.to_s @command = command @info = info super("Failed to run git #{command.join(' ')}: #{@status}") end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
30 31 32 |
# File 'lib/minigit.rb', line 30 def command @command end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
30 31 32 |
# File 'lib/minigit.rb', line 30 def info @info end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
30 31 32 |
# File 'lib/minigit.rb', line 30 def status @status end |