Sha256: 9602959a6df8258dba2449df9b2357f35a498203857ef2aeb2eaec1ac3f23588
Contents?: true
Size: 371 Bytes
Versions: 11
Compression:
Stored size: 371 Bytes
Contents
# frozen_string_literal: true require 'parametric/block_validator' module Parametric class Registry attr_reader :policies def initialize @policies = {} end def coercions policies end def policy(name, plcy = nil, &block) policies[name] = (plcy || BlockValidator.build(:instance_eval, &block)) self end end end
Version data entries
11 entries across 11 versions & 1 rubygems