ruby add property to object code example
Example: ruby create object with attributes
class MyObject
attr_accessor :attribute1, :attribute2, :attribute3
end
test_object = MyObject.new
test_object.attribute1 = "Holy cow!"
class MyObject
attr_accessor :attribute1, :attribute2, :attribute3
end
test_object = MyObject.new
test_object.attribute1 = "Holy cow!"