Exception: R10K::R10KError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/r10k/errors.rb

Overview

An error class that accepts an optional hash.

Instance Method Summary collapse

Constructor Details

#initialize(mesg = nil, options = {}) ⇒ R10KError



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/r10k/errors.rb', line 19

def initialize(mesg = nil, options = {})
  if mesg.is_a? String
    super(mesg)
    @mesg    = mesg
    @options = options
  elsif mesg.is_a? Hash
    @mesg    = nil
    @options = mesg
  elsif mesg.nil? and options
    @options = options
  end
end