Sha256: 1c2d97a43da4b65e9a8d530a2693753891a3950ff95759ec15b155aae4320c78

Contents?: true

Size: 955 Bytes

Versions: 1

Compression:

Stored size: 955 Bytes

Contents

require 'redic'
require 'redic-sentinels'
require 'class_config'
require 'forwardable'
require 'securerandom'

require_relative 'restruct/version'
require_relative 'restruct/errors'
require_relative 'restruct/structure'
require_relative 'restruct/id'
require_relative 'restruct/array'
require_relative 'restruct/set'
require_relative 'restruct/hash'
require_relative 'restruct/queue'
require_relative 'restruct/nested_hash'
require_relative 'restruct/marshalizable'
require_relative 'restruct/marshal_array'
require_relative 'restruct/marshal_set'
require_relative 'restruct/marshal_hash'
require_relative 'restruct/marshal_queue'
require_relative 'restruct/locker'
require_relative 'restruct/connection'


module Restruct

  extend ClassConfig

  attr_config :connection, Connection.simple
  attr_config :id_separator, ':'
  attr_config :id_generator, ->() { Id.new(:restruct)[SecureRandom.uuid] }

  def self.generate_id
    id_generator.call
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restruct-1.0.0 lib/restruct.rb