Sha256: af39ef91ef4cd0a8319af6ec2b611f8678a5ba8f46e19fe9795c0ea092ae762a

Contents?: true

Size: 301 Bytes

Versions: 1

Compression:

Stored size: 301 Bytes

Contents

module SiteHealth
  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

1 entries across 1 versions & 1 rubygems

Version Path
site_health-0.1.0 lib/site_health/key_struct.rb