Methods
I
P
T
W
Class Public methods
included(base)
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 21
def included(base)
  Object.class_eval do
    def translation_metadata
      @translation_metadata ||= {}
    end
    def translation_metadata=(translation_metadata)
      @translation_metadata = translation_metadata
    end
  end unless Object.method_defined?(:translation_metadata)
end
translation_metadata()
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 23
def translation_metadata
  @translation_metadata ||= {}
end
translation_metadata=(translation_metadata)
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 27
def translation_metadata=(translation_metadata)
  @translation_metadata = translation_metadata
end
Instance Public methods
interpolate(locale, entry, values = {})
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 46
def interpolate(locale, entry, values = {})
  metadata = entry.translation_metadata.merge(:original => entry)
  with_metadata(metadata) { super }
end
pluralize(locale, entry, count)
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 51
def pluralize(locale, entry, count)
  with_metadata(:count => count) { super }
end
translate(locale, key, options = {})
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 34
def translate(locale, key, options = {})
  metadata = {
    :locale    => locale,
    :key       => key,
    :scope     => options[:scope],
    :default   => options[:default],
    :separator => options[:separator],
    :values    => options.reject { |name, value| Base::RESERVED_KEYS.include?(name) }
  }
  with_metadata(metadata) { super }
end
Instance Protected methods
with_metadata(metadata, &block)
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb, line 57
def with_metadata(metadata, &block)
  result = yield
  result.translation_metadata = result.translation_metadata.merge(metadata) if result
  result
end