Follow TV Tropes

Following

Media Notes / Ruby

Go To

https://static.tvtropes.org/pmwiki/pub/images/ruby_1.png

Ruby is an Imperative, Multi-Paradigm, Strongly and Dynamically Typed Programming Language.

It is most commonly used with the Rails framework to make dynamic webpages; this is combo is also known as Ruby on Rails.

You can try out Ruby for yourself here.

History

Ruby was released in 1995 on Japanese newsgroups by Yukihiro "Matz" Matsumoto. He wanted a truly OOP Programming language that was fully featured and easy to use.


    Code Examples 

Hello Ruby

puts "Hello World!"

This program outputs Hello World!

Variable Declaration and Concatenation

a = 10 
b = 7
c = "Bob"
puts a+b
#Outputs 17
puts b+c
#Throws an Error
puts "Hello, "+c
#Outputs Hello, Bob

For Loops

for i in 0..9 
    puts i
end

Works Written in Ruby

    Websites 


Top