Exception: GitUp::GitError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/git-up.rb

Instance Method Summary collapse

Constructor Details

#initialize(message, output = nil) ⇒ GitError

Returns a new instance of GitError.



206
207
208
209
210
211
212
213
214
215
# File 'lib/git-up.rb', line 206

def initialize(message, output=nil)
  @msg = "#{message.red}"

  if output
    @msg << "\n"
    @msg << "Here's what Git said:".red
    @msg << "\n"
    @msg << output
  end
end

Instance Method Details

#messageObject



217
218
219
# File 'lib/git-up.rb', line 217

def message
  @msg
end