Class: FastGettext::TranslationRepository::Logger

### Home Classes Methods

### In Files

- lib/fast_gettext/translation_repository/logger.rb

### Parent

FastGettext::TranslationRepository::Base

### Methods

- ::new
- #[]
- #plural

### Class/Module Index

Quicksearch

- FastGettext
- FastGettext::Cache
- FastGettext::GetText
- FastGettext::GetText::MOFile
- FastGettext::GetText::MOFile::HeaderRev1
- FastGettext::GetText::MOFile::InvalidFormat
- FastGettext::GetText::PoParser
- FastGettext::MoFile
- FastGettext::PoFile
- FastGettext::Storage
- FastGettext::Storage::NoTextDomainConfigured
- FastGettext::Translation
- FastGettext::TranslationMultidomain
- FastGettext::TranslationRepository
- FastGettext::TranslationRepository::Base
- FastGettext::TranslationRepository::Chain
- FastGettext::TranslationRepository::Db
- FastGettext::TranslationRepository::Logger
- FastGettext::TranslationRepository::Mo
- FastGettext::TranslationRepository::Po
- FastGettext::TranslationRepository::Yaml
- String
- TranslationKey
- TranslationText

No matching classes.

# FastGettext::TranslationRepository::Logger

This should be used in a TranslationRepository::Chain, so tat untranslated keys can be found Responsibility:

    - log every translation call

### Attributes

callback[RW]

### Public Class Methods

new(name,options={}) click to toggle source

    # File lib/fast_gettext/translation_repository/logger.rb, line 11
    def initialize(name,options={})
      super
      self.callback = options[:callback]
    end

### Public Instance Methods

[](key) click to toggle source

    # File lib/fast_gettext/translation_repository/logger.rb, line 16
    def [](key)
      callback.call(key)
      nil
    end

plural(*keys) click to toggle source

    # File lib/fast_gettext/translation_repository/logger.rb, line 21
    def plural(*keys)
      callback.call(keys)
      []
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.