Class: Arbetsformedlingen::KeyStruct
- Inherits:
-
Struct
- Object
- Struct
- Arbetsformedlingen::KeyStruct
- Defined in:
- lib/arbetsformedlingen/key_struct.rb
Instance Method Summary collapse
-
#initialize(**keyword_args) ⇒ KeyStruct
constructor
A new instance of KeyStruct.
Constructor Details
#initialize(**keyword_args) ⇒ KeyStruct
Returns a new instance of KeyStruct.
5 6 7 8 9 10 11 12 13 |
# File 'lib/arbetsformedlingen/key_struct.rb', line 5 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 |