Exception: Emojidex::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/emojidex/error.rb

Overview

emojidex error class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception = $ERROR_INFO) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
11
12
13
# File 'lib/emojidex/error.rb', line 6

def initialize(exception = $ERROR_INFO)
  @wrapped_exception = exception
  if exception.respond_to?(:message)
    super(exception.message)
  else
    super(exception.to_s)
  end
end

Instance Attribute Details

#wrapped_exceptionObject (readonly)

Returns the value of attribute wrapped_exception.



4
5
6
# File 'lib/emojidex/error.rb', line 4

def wrapped_exception
  @wrapped_exception
end