Sha256: 5a53e10eea03e9ae9ce4750f82cdb1b653c419fe28445660a7caf63690befe29

Contents?: true

Size: 782 Bytes

Versions: 21

Compression:

Stored size: 782 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Repositories

    # Provides behaviour for resetting and accessing the storage of
    # various repositories.
    #
    # @api private
    #
    module Storage

      extend self

      # Remove all currently stored data for this repository.
      #
      # @return [void]
      def reset!
        Vedeu.log(type:    :reset,
                  message: "Resetting repository '#{self.class.name}'")

        @storage = in_memory
      end
      alias reset reset!

      # Return whole repository; provides raw access to the storage
      # for this repository.
      #
      # @return [void]
      def storage
        @storage ||= in_memory
      end
      alias all storage

    end # Storage

  end # Repositories

end # Vedeu

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
vedeu-0.8.32 lib/vedeu/repositories/storage.rb
vedeu-0.8.31 lib/vedeu/repositories/storage.rb
vedeu-0.8.30 lib/vedeu/repositories/storage.rb
vedeu-0.8.29 lib/vedeu/repositories/storage.rb
vedeu-0.8.28 lib/vedeu/repositories/storage.rb
vedeu-0.8.27 lib/vedeu/repositories/storage.rb
vedeu-0.8.26 lib/vedeu/repositories/storage.rb
vedeu-0.8.25 lib/vedeu/repositories/storage.rb
vedeu-0.8.24 lib/vedeu/repositories/storage.rb
vedeu-0.8.23 lib/vedeu/repositories/storage.rb
vedeu-0.8.22 lib/vedeu/repositories/storage.rb
vedeu-0.8.21 lib/vedeu/repositories/storage.rb
vedeu-0.8.20 lib/vedeu/repositories/storage.rb
vedeu-0.8.19 lib/vedeu/repositories/storage.rb
vedeu-0.8.18 lib/vedeu/repositories/storage.rb
vedeu-0.8.17 lib/vedeu/repositories/storage.rb
vedeu-0.8.16 lib/vedeu/repositories/storage.rb
vedeu-0.8.15 lib/vedeu/repositories/storage.rb
vedeu-0.8.14 lib/vedeu/repositories/storage.rb
vedeu-0.8.13 lib/vedeu/repositories/storage.rb