Sha256: c42773c08183428b98cbb52ab2ebbc3db1625b7db44e8a3d26ad3a7f083aea27

Contents?: true

Size: 585 Bytes

Versions: 1

Compression:

Stored size: 585 Bytes

Contents

module Asynchronic
  module DataStore
    module Helper

      include Enumerable

      def each
        keys.each { |k| yield [k, self[k]] }
        nil
      end

      def merge(hash)
        hash.each { |k,v| self[k] = v }
      end

      def clear
        keys.each { |k| delete k }
      end

      def scoped(key)
        ScopedStore.new self, key
      end

      def readonly?
        false
      end

      def readonly
        ReadonlyStore.new self
      end

      def lazy?
        false
      end

      def lazy
        LazyStore.new self
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asynchronic-0.2.0 lib/asynchronic/data_store/helper.rb