Module: I18n::Coverage

Defined in:
lib/i18n/coverage.rb,
lib/i18n/coverage/config.rb,
lib/i18n/coverage/version.rb,
lib/i18n/coverage/reporter.rb,
lib/i18n/coverage/key_lister.rb,
lib/i18n/coverage/key_logger.rb,
lib/i18n/coverage/printers/file_printer.rb,
lib/i18n/coverage/printers/basic_printer.rb

Defined Under Namespace

Modules: Printers Classes: Config, KeyLister, KeyLogger, Reporter

Constant Summary collapse

VERSION =
'0.2.0'.freeze

Class Method Summary collapse

Class Method Details

.configObject



14
15
16
# File 'lib/i18n/coverage.rb', line 14

def self.config
  @config ||= Config.new
end

.configure {|@config| ... } ⇒ Object

Yields:



18
19
20
21
# File 'lib/i18n/coverage.rb', line 18

def self.configure
  @config = Config.new
  yield @config if block_given?
end

.startObject



9
10
11
12
# File 'lib/i18n/coverage.rb', line 9

def self.start
  I18n::Backend::Simple.include I18n::Backend::KeyLogger
  at_exit { I18n::Coverage::Reporter.report }
end