Sha256: 51133d9f30ea2b5f2f0dfba7ac237ea7942991d62d51562c5aa3145b8fd1ba5f

Contents?: true

Size: 274 Bytes

Versions: 76

Compression:

Stored size: 274 Bytes

Contents

# require "eitil_core/errors/raise_error"

Kernel.module_eval do

  def raise_error(_class_name, message = nil)   
    Object.const_set(_class_name, Class.new(StandardError)) unless Object.const_defined?(_class_name)
    raise _class_name.constantize.new message
  end

end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
eitil-2.0.8 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.7 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.6 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.5 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.4 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.3 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.2 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.1 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-2.0.0 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.4.1 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.4.0 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.12 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.11 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.10 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.9 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.8 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.7 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.6 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.5 eitil_core/lib/eitil_core/errors/raise_error.rb
eitil-1.3.4 eitil_core/lib/eitil_core/errors/raise_error.rb