Sha256: 775aeaedc6cce55466232bde837bcd6871894ec6a7029be92732d323c3fbf956

Contents?: true

Size: 371 Bytes

Versions: 1

Compression:

Stored size: 371 Bytes

Contents

module Twitter
  module Cache
    class Config
      attr_accessor :redis, :ttl, :namespace

      def namespace
        @namespace ||= 'twitter-cache-gem'
      end

      def user_instance(&block)
        @user_instance = block
      end

      def convert_user(raw)
        return raw unless @user_instance
        @user_instance.call(raw)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter-cache-0.2.0 lib/twitter/cache/config.rb