Module: ShowMeTheObject::Exception

Defined in:
lib/show_me_the_object/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#__raiserObject

Returns the value of attribute __raiser.



5
6
7
# File 'lib/show_me_the_object/exception.rb', line 5

def __raiser
  @__raiser
end

Instance Method Details

#messageObject



7
8
9
10
11
12
13
14
# File 'lib/show_me_the_object/exception.rb', line 7

def message
  raised_by = if __raiser.respond_to?(:ai)
    __raiser.ai
  else
    __raiser.inspect
  end
  "#{super}\nRaised by: \n#{raised_by}"
end