Sha256: eb0dc68f77fb0d9432b096d8af842f51678e4db8a8632ee99900561f23ca1b08
Contents?: true
Size: 546 Bytes
Versions: 16
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true module Lcms module Engine class BasePresenter < SimpleDelegator def initialize(obj, opts = {}) super(obj) opts.each_pair do |key, value| instance_variable_set("@#{key}", value) end end def t(key, options = {}) class_name = self.class.to_s.underscore options[:raise] = true if key.starts_with?('.') I18n.t("#{class_name}.#{key}", options) else I18n.t(key, options) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems