Sha256: 4ae71f292a69b4f1c38446db320e6f3feeefab95bf0efb41bf31b2c06e2a14c9

Contents?: true

Size: 259 Bytes

Versions: 2

Compression:

Stored size: 259 Bytes

Contents

module TwitterCache
  class Config
    attr_accessor :twitter, :redis, :ttl

    def user_instance(&block)
      @user_instance = block
    end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter-cache-0.1.1 lib/twitter_cache/config.rb
twitter-cache-0.1.0 lib/twitter_cache/config.rb