irb usage

irb

** The irb command can run Ruby programs directly from the terminal Activate the function. By the way, irb is an abbreviation for "Interactive Ruby". ** **

I will explain the procedure to execute Ruby simply. This time, we will use a function called the irb command to execute the program without a file.

[Example]Terminal


#Start irb
% irb
[Example] Terminal

irb.png

** In irb, every time you hit the enter key, you can execute the description up to that point and display the result. ** **

irbirb.png

** When exiting irb, write exit </ font> and execute. ** **

[Example] End of irb


#Exit irb
irb(main):001:0> exit

#If it finishes without any problem, you will be prompted
%

Use irb for easy confirmation of the value.

Summary

** irb is to run Ruby programs directly from the terminal Functions that can be performed. ** **

that's all.

Recommended Posts

irb usage
Interface usage example
JavaParser usage memo
WatchService usage memo
PlantUML usage memo
JUnit5 usage memo