Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 458 Bytes

Ruby.md

File metadata and controls

34 lines (23 loc) · 458 Bytes

Ruby

Ruby documentation as I learn it. PR's to the documentation are welcome.

I/O

Input/output is similar to Python, Bash, and C.

Reading Example

word = gets

Writing Example

puts "Hello, World!"

Strings

The worst part in any language.

Luckily, strings in Ruby can be manipulated similarly to Python via square bracket indexing (i.e. [i]). For example:

% ruby
word = gets
puts word[0]
^D
lol
l