Class: Booth::ToStruct

Inherits:
Object
  • Object
show all
Includes:
MethodObject
Defined in:
lib/booth/to_struct.rb

Instance Method Summary collapse

Methods included from MethodObject

included

Instance Method Details

#callObject



7
8
9
# File 'lib/booth/to_struct.rb', line 7

def call
  ::Struct.new(*attributes.keys, keyword_init: true).new(**attributes)
end