Ruby - Metaprogramming Fundamentals
What will be the output of the following Ruby code?
require 'ostruct' person = OpenStruct.new person.age = 30 puts person.age
require 'ostruct' person = OpenStruct.new person.age = 30 puts person.age
person.age = 30 sets the age property to 30.puts person.age prints the value 30 stored in the age property.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions