Sha256: 4423e80c5028a54926921543557ac2a79f6c9526729a4c34c5fb2331babf4f1e
Contents?: true
Size: 578 Bytes
Versions: 10
Compression:
Stored size: 578 Bytes
Contents
module Motr module Errors # Default parent Motr error for all custom errors. This handles the base # key for the translations and provides the convenience method for # translating the messages. # class MotrError < StandardError BASE_KEY = "motr.errors" # ## # Translate an error message # @param [String] key The i18n message key # @param [Hash] options Options to pass to the i18n library # def translate(key, options) ::I18n.translate("#{BASE_KEY}.#{key}", options) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems