Sha256: 021ba932848b5e0a5e0f2319c59913dd6b70333271b7e6e35ab985f27fd63b7d

Contents?: true

Size: 571 Bytes

Versions: 6

Compression:

Stored size: 571 Bytes

Contents

module RestCore; end
module RestCore::RailsUtilUtil
  module Cache
    def []    key       ;  read(key)                ; end
    def []=   key, value; write(key, value)         ; end
    def store key, value,
              options={}; write(key, value, options); end
  end

  module_function
  def extract_options members, options, method
    # Hash[] is for ruby 1.8.7
    # map(&:to_sym) is for ruby 1.8.7
    Hash[options.send(method){ |(k, v)| members.map(&:to_sym).member?(k) }]
  end
end

ActiveSupport::Cache::Store.send(:include, RestCore::RailsUtilUtil::Cache)

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rest-more-0.7.1 lib/rest-core/util/rails_util_util.rb
rest-core-0.7.0 lib/rest-core/util/rails_util_util.rb
rest-core-0.4.0 lib/rest-core/util/rails_util_util.rb
rest-core-0.4.0.pre.2 lib/rest-core/util/rails_util_util.rb
rest-core-0.4.0.pre.1 lib/rest-core/util/rails_util_util.rb
rest-core-0.4.0.pre.0 lib/rest-core/util/rails_util_util.rb