Sha256: 6eed844b2c24652ed6d19b4406522b5ede23c9a2cb7a3b91f932602545d6fd08

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

module Arbetsformedlingen
  class KeyStruct < Struct
    def initialize(**keyword_args)
      keyword_args.each do |key, value|
        if members.include?(key)
          self[key] = value
        else
          raise ArgumentError, "Unknown key struct member: #{key}"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
arbetsformedlingen-0.5.0 lib/arbetsformedlingen/key_struct.rb
arbetsformedlingen-0.4.1 lib/arbetsformedlingen/key_struct.rb
arbetsformedlingen-0.4.0 lib/arbetsformedlingen/key_struct.rb
arbetsformedlingen-0.3.0 lib/arbetsformedlingen/key_struct.rb