Check out example codes for "ruby create object with attributes". It will help you in understanding the concepts better.

Code Example 1

class MyObject
  attr_accessor :attribute1, :attribute2, :attribute3
end

test_object = MyObject.new
test_object.attribute1 = "Holy cow!"

Learn ReactJs, React Native from akashmittal.com