Freshly/spicerack

View on GitHub
lib/spicerack/redis_model.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Spicerack
  class RedisModel < RedisHash::Base
    include Spicerack::HashModel

    alias_method :data, :itself

    class << self
      def field(name, *, **)
        allow_keys(name)
        super
      end
    end
  end
end