Sha256: d40d674532ba81625ad096c05b218dd65422f28a1732f7e72c0891fc3815324c

Contents?: true

Size: 643 Bytes

Versions: 31

Compression:

Stored size: 643 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

      def no_lazy
        NoLazyStore.new self
      end

    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
asynchronic-4.0.3 lib/asynchronic/data_store/helper.rb
asynchronic-4.0.2 lib/asynchronic/data_store/helper.rb
asynchronic-4.0.1 lib/asynchronic/data_store/helper.rb
asynchronic-4.0.0 lib/asynchronic/data_store/helper.rb
asynchronic-3.0.3 lib/asynchronic/data_store/helper.rb
asynchronic-3.0.2 lib/asynchronic/data_store/helper.rb
asynchronic-3.0.1 lib/asynchronic/data_store/helper.rb
asynchronic-3.0.0 lib/asynchronic/data_store/helper.rb
asynchronic-2.0.1 lib/asynchronic/data_store/helper.rb
asynchronic-2.0.0 lib/asynchronic/data_store/helper.rb
asynchronic-1.6.3 lib/asynchronic/data_store/helper.rb
asynchronic-1.6.2 lib/asynchronic/data_store/helper.rb
asynchronic-1.6.1 lib/asynchronic/data_store/helper.rb
asynchronic-1.6.0 lib/asynchronic/data_store/helper.rb
asynchronic-1.5.2 lib/asynchronic/data_store/helper.rb
asynchronic-1.5.1 lib/asynchronic/data_store/helper.rb
asynchronic-1.5.0 lib/asynchronic/data_store/helper.rb
asynchronic-1.4.0 lib/asynchronic/data_store/helper.rb
asynchronic-1.3.1 lib/asynchronic/data_store/helper.rb
asynchronic-1.3.0 lib/asynchronic/data_store/helper.rb