INTRODUCTION
Ruby is a lenguage oriented to objects focused to simplicity and productivity, Its sintaxys was inspired on python and perl with charasteristics to programming oriented to objects similar to smalltalk.
Its official implementation is distributed under the licence of free software.
REQUIREMENTS TO RUN
https://www.ruby-lang.org/es/documentation/installation/
choose the installer for you OS and install.
HELLO WORLD
- Open your terminal and write: irb
- after write: puts "Hello World"
done!, remenber "puts" is to show a variable in console, similar to : echo(PHP), print(python), console.log(JavaScript), etc.
IN A FILE
Here we going to use class and methods to say "hello world", I did that for understand generally how to use ruby.
We create a file named "hi.rb"
Inside we put this code.
after, in the terminal we go to the file and execute the file with the ruby command :
All the description of the code is as comment in the image. As you can see this tutorial in only to say hello world with ruby and no more, if you want to learn deeper in ruby, you need to search others tutorial.
Thanks!!!



No hay comentarios:
Publicar un comentario