Sha256: dfd194e2783c3ab8619ad41425fad918cb28d05de2352cd48f56fd243d956217
Contents?: true
Size: 330 Bytes
Versions: 2
Compression:
Stored size: 330 Bytes
Contents
# frozen_string_literal: true module Arbetsformedlingen class KeyStruct < Struct def initialize(**keyword_args) keyword_args.each do |key, value| unless members.include?(key) raise ArgumentError, "Unknown key struct member: #{key}" end self[key] = value end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arbetsformedlingen-0.7.0 | lib/arbetsformedlingen/key_struct.rb |
arbetsformedlingen-0.6.0 | lib/arbetsformedlingen/key_struct.rb |