Sha256: fd38af2c601bc858f0e0b15a5b0389edc3c78a6bcf6c4c22de7d5fdeafba0854

Contents?: true

Size: 277 Bytes

Versions: 3

Compression:

Stored size: 277 Bytes

Contents

def new_exception(klass, message)
  eval "class #{klass}; def initialize; super('#{message}'); end; end"
end

new_exception('FileParserError < ArgumentError', 'File not found !')
new_exception('KeyRequiredError < ArgumentError', 'This method requires a valid Google API key.')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
babel_i18n-0.0.6 lib/babel_i18n/exceptions.rb
babel_i18n-0.0.5 lib/babel_i18n/exceptions.rb
babel_i18n-0.0.4 lib/babel_i18n/exceptions.rb