Sha256: 59c10c20057ba74f78c337667705cfdbdb14f425ecf51c9fc0ae90b7002375f5

Contents?: true

Size: 764 Bytes

Versions: 2

Compression:

Stored size: 764 Bytes

Contents

require 'redic'
require 'class_config'
require 'forwardable'
require 'securerandom'

require_relative 'restruct/version'
require_relative 'restruct/structure'
require_relative 'restruct/id'
require_relative 'restruct/array'
require_relative 'restruct/set'
require_relative 'restruct/hash'
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/batch'

module Restruct

  extend ClassConfig

  attr_config :redis, Redic.new
  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

2 entries across 2 versions & 1 rubygems

Version Path
restruct-0.0.3 lib/restruct.rb
restruct-0.0.2 lib/restruct.rb