Check out example codes for "ruby initialize method". It will help you in understanding the concepts better.

Code Example 1

def initialize
	@nameOfInstance = block of code that creates an instance variable.
end

Learn ReactJs, React Native from akashmittal.com