I'm writing this tutorial, and also to show how 'interactive' use of Ruby. Simply because we can create several simple software, but with the advancement of each poderam things flow and then you can develop several applications. Not to mention that it's not just this course you will learn all about Ruby, I'm just going to necessarily matter in a simplified form and it behooves you to look harder and ask when you feel doubt, you are charged to the effort to advance the language.
First of all I want you to know a new friend who helped us develop our applications it is called Shoes. is an application developed by a master in that Ruby was created precisely so that we can develop so fast and simple visual applications.
How to install the Shoes?
It is simple first you will download in the site: http://shoes.heroku.com/
It has versions for Mac OS X, Linux, Windows.
Once downloaded run the installer, or open it in a shell if it is on Linux with. Run, (you can get more information on the Site.)
After that you open a text editor, and write to get the joke:
Save as Welcome.rb on your desktop then open the app and look for shoes, double clicks and opens the window with the text
"In Ruby, everything can be possible"
This is just the beginning boys.
Let's start using this kind of beginning to develop some things lecais!
We started our "Shoes.app" put a Button (Button) then pop up a specialist who is an alert.
Pretty simple is not it?
Let there is some information regarding this syntax 'different' for developing applications.
SHOES.
as you already have the basics of Ruby in the head will not be so hard, so I will not explain things, I will just present the code and then you go is good training at home.
Let's do something basic, and worked with Strings:
This is a simple alert, you know well.
The next:
This now opens a window asking the question and a field for entering the name.
It seems to function 'gets' in pure Ruby.
Ah, this still too weak?
We now have a true or false, then we open a aopção esclher of a color, and if you noticed the color you chose after you press the 'ok' becomes the background of the window.
Apart from that, you can create any things, just take one investigated.
Okay, for you it is not worth anything ta ..
RUBY SHOES WITH IN WEB.
From then on you can investigate and understand more how is the Ruby is used with other tools or in a different way.
I'm from Brazil and my English is a shi*, because it I hope you undertand the my wrongs in english .
By : f0nt_Drk