class MyClass
def initialize(**attrs)
@name = attrs[:name]
@age = attrs[:age]
end
end
my_object = MyClass.new(name: "John", age: 25)
class MyClass
def initialize(**attrs)
@name = attrs[:name]
@age = attrs[:age]
end
end
my_object = MyClass.new(name: "John", age: 25)