background preloader

Ruby

Facebook Twitter

Learn Ruby The Hard Way — Learn Ruby The Hard Way. Learn Ruby with the Neo Ruby Koans. Code School - TryRuby. Ruby Programming Tutorials Playlist. Welcome to YouTube! Suggested Location Filter (we have set your preference to this): France The location filter shows you popular videos from the selected country or region on lists like Most Viewed and in search results.To change your location filter, please use the links in the footer at the bottom of the page. Click "OK" to accept this setting, or click "Cancel" to set your location filter to "Worldwide". The location filter shows you popular videos from the selected country or region on lists like Most Viewed and in search results. 1 4:17 Ruby Programming Tutorial - 1 - Installing Ruby by thenewboston 75,900 views 2 6:07 Ruby Programming Tutorial - 2 - Writing a Simple Program by thenewboston 15,378 views 3 4:16 Ruby Programming Tutorial - 3 - Math and Variables by thenewboston 7,238 views 4 4:58 Ruby Programming Tutorial - 4 - Classes by thenewboston 7,532 views 5 6:41 Ruby Programming Tutorial - 5 - Creating Objects by thenewboston 6,477 views About thenewboston.

Ruby in Twenty Minutes. Introduction This is a small Ruby tutorial that should take no more than 20 minutes to complete. It makes the assumption that you already have Ruby installed. (If you do not have Ruby on your computer install it before you get started.) Interactive Ruby Ruby comes with a program that will show the results of any Ruby statements you feed it. Open up IRB (which stands for Interactive Ruby). If you’re using macOS open up Terminal and type irb, then hit enter. Irb(main):001:0> Ok, so it’s open. Type this: "Hello World" irb(main):001:0> "Hello World" => "Hello World" Ruby Obeyed You!

What just happened? Irb(main):002:0> puts "Hello World" Hello World => nil puts is the basic command to print something out in Ruby. Your Free Calculator is Here Already, we have enough to use IRB as a basic calculator: irb(main):003:0> 3+2 => 5 Three plus two. Irb(main):004:0> 3*2 => 6 Next, let’s try three squared: irb(main):005:0> 3**2 => 9 In Ruby ** is the way you say “to the power of”. Ok, wait, what was that last one?