[ruby] drill output


Writing code using the concept of classes and instances image.png Please add to the above code so that you can get the following output result. However, we will use classes and instances. image.png


image.png 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

[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
[ruby] drill output
Ruby input / output
Ruby standard output
Ruby logical operator drill
Ruby calorie calculation output
Output triangle in Ruby
[Ruby on Rails] CSV output function
String output method memo in Ruby
Ruby learning 4
[Ruby] Array
Ruby learning 5
Ruby basics
Ruby Review 2
Ruby addition
Refactoring Ruby
Ruby learning 3
2020/10/4 Morning output
Ruby print puts p printf output method
2020/10/4 noon output
Learning output ~ 11/3 ~
Ruby setting 2
Ruby problem ⑦
2020/10/5 Morning output
Ruby learning 2
[Ruby] Block
Refactoring Ruby
ruby calculator
Ruby learning 6
Ruby settings 1
Refactoring Ruby
Learning output
2020/10/3 Noon output
Ruby basics
Ruby memo
Ruby learning 1
Ruby Review 1
From terminal to Ruby (standard input / output)
2020/10/3 Morning output
[Ruby] Module
Drill (self-made)
[Ruby] Difference between puts and return, output and return value