Sha256: 88e63bf7548f5e72a58b40fa81a3576215bddd85e47e8c4a2a221b9e6e978c1e

Contents?: true

Size: 242 Bytes

Versions: 10

Compression:

Stored size: 242 Bytes

Contents

RACK_ENV = 'development'

class Exception
  def to_hash(extra = nil)
    h = { 'message' => message }
    h = h.merge('backtrace' => backtrace) if %w{development staging test}.include?(RACK_ENV)
    h = h.merge(extra) if extra
    h
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
github-safegem-0.2.0 lib/safegem/exception.rb
github-safegem-0.2.10 lib/safegem/exception.rb
github-safegem-0.2.2 lib/safegem/exception.rb
github-safegem-0.2.3 lib/safegem/exception.rb
github-safegem-0.2.4 lib/safegem/exception.rb
github-safegem-0.2.5 lib/safegem/exception.rb
github-safegem-0.2.6 lib/safegem/exception.rb
github-safegem-0.2.7 lib/safegem/exception.rb
github-safegem-0.2.8 lib/safegem/exception.rb
github-safegem-0.2.9 lib/safegem/exception.rb