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.



261
262
263
264
265
266
267
268
269
270
# File 'lib/git-up.rb', line 261

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



272
273
274
# File 'lib/git-up.rb', line 272

def message
  @msg
end