Sha256: c54bf653e8a3b08335b82f462b5f81f0018811e56b4c72fc212f2780bcabc890
Contents?: true
Size: 669 Bytes
Versions: 16
Compression:
Stored size: 669 Bytes
Contents
# -*- encoding : utf-8 -*- module Kabutops module CrawlerExtensions module PStoreStorage extend Extensions::Includable class Storage def initialize path='.kabutopus.config.pstore' @storage ||= PStore.new(path) end def [] key @storage.transaction { @storage[key.to_sym] } end def []= key, value @storage.transaction do @storage[key.to_sym] = value end end end module ClassMethods def storage @storage ||= Storage.new end end def storage self.class.storage end end end end
Version data entries
16 entries across 16 versions & 1 rubygems