class Object
Public Instance Methods
get_translation_for(key, options)
click to toggle source
# File lib/action_mailer/markdown/ext.rb, line 14 def get_translation_for(key, options) I18n.t(key, options.merge(scope: [mailer_scope, action_name], raise: true)) rescue I18n::MissingTranslationData nil end
mailer_scope()
click to toggle source
# File lib/action_mailer/markdown/ext.rb, line 29 def mailer_scope self.class.mailer_name.tr("/", ".") end
variables_set_by_user()
click to toggle source
# File lib/action_mailer/markdown/ext.rb, line 20 def variables_set_by_user instance_variables.each_with_object({}) do |name, buffer| next if name =~ /^@_/ name = name.to_s[/^@(.*?)$/, 1] buffer[name.to_sym] = instance_variable_get("@#{name}") end end