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.



175
176
177
178
179
180
181
182
183
184
# File 'lib/git-up.rb', line 175

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



186
187
188
# File 'lib/git-up.rb', line 186

def message
  @msg
end