Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyStruct and DataSingle-choice MCQ

What happens when you construct a `Data` object while omitting a required member, e.g. `D.new(a: 1)` for `D = Data.define(:a, :b)`?

D = Data.define(:a, :b) D.new(a: 1) # => ArgumentError: missing keyword: :b