Writing code using the concept of classes and instances Please add to the above code so that you can get the following output result. However, we will use classes and instances.
First, I want to assign (Abe, Awesome Ruby! About the wonderfulness of Ruby) to the instance variable declared by the initialize method on the 3rd to 7th lines, so set the value of the instance variable on the 9th to 19th lines. Define each instance method to return. Then, on line 21, create an instance of the Article class and assign it to the variable article. At that time, I will pass (Abe, Awesome Ruby! About the wonderfulness of Ruby) as a formal argument as an actual argument.
Then I succeeded in calling all mysteriously ----- ✨
Recommended Posts