Sha256: 7c917117a5d69c264683701df3021eb958dcd5b2a7ef975f15e5b45bcdbbe4cc

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

module I18n
  module Coverage
    class KeyLogger
      def self.store_key(key)
        KeyLogger.new.store_key(key)
      end

      def self.stored_keys
        KeyLogger.new.stored_keys
      end

      def self.clear_keys
        KeyLogger.new.clear_keys
      end

      def store_key(key)
        stored_keys.add(key)
      end

      def clear_keys
        stored_keys.clear        
      end

      def stored_keys
        @@stored_keys ||= Set[]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i18n-coverage-0.1.1 lib/i18n/coverage/key_logger.rb
i18n-coverage-0.1.0 lib/i18n/coverage/key_logger.rb