Sha256: ed740616b97e630873ce939c2904579b7a2fca2dfaa0be3e83aa37819f159fd4
Contents?: true
Size: 460 Bytes
Versions: 48
Compression:
Stored size: 460 Bytes
Contents
# frozen_string_literal: true module Ree::Contracts module ArgContracts class Kwargs < SimpleDelegator def self.[](**contracts) if contracts.empty? raise BadContractError, 'Kwargs contract should accept at least one contract' end new(**contracts) end attr_reader :contracts def initialize(**contracts) @contracts = contracts super(contracts) end end end end
Version data entries
48 entries across 48 versions & 1 rubygems