Sha256: 5f1ce562fdc99991b5743947f5e1fffc5673de07c73f33526146b4f50747d6bc

Contents?: true

Size: 298 Bytes

Versions: 1

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

module ActiveTypedStore
  module Store
    def typed_store(store_attribute, &)
      attrs = Attrs.new(store_attribute)
      attrs.instance_eval(&)

      store store_attribute, accessors: attrs.fields, coder: JSON
      include attrs.store_module
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_typed_store-1.1.0 lib/active_typed_store/store.rb