Ruby lines are short and friendly: print values with puts, store them in variables, and never declare a type.
1 puts prints a line
puts takes any value, prints it and moves the cursor to the next line.
2 Variables just happen
Write name = "Ada" and the variable exists — there is no type to declare, ever.
3 The core value family
Integer, Float, String, Symbol, true/false and nil cover almost everything you touch at first.
4 Comments with #
Anything after # on a line is a note for humans — Ruby skips right past it.
The building blocks
puts prints a line1puts takes any value, prints it and moves the cursor to the next line. Variables just happen2Write name = "Ada" and the variable exists — there is no type to declare, ever. The core value family3Integer, Float, String, Symbol, true/false and nil cover almost everything you touch at first. Comments with #4Anything after # on a line is a note for humans — Ruby skips right past it. 4 building blocks make up The building blocks
Every line gets checked, evaluated and printed — and one bad character can stop the show.
process decision input / output start / end Press play — every value lands in a variable and puts writes it to the console.
mainname now points to the String "Ada".
Console
output appears as the program runs…
Click a value, then click its type to lock the pair.
6 conceptsTap a card to expand ?42drops into place
?"Ada"drops into place
?3.14drops into place
?:rubydrops into place
?true / falsedrops into place
?nildrops into place
Variables can be reassigned — but old copies do not follow along.
Your predicted output — one line per console line
Hint: count walks 3 → 7 → 14, one assignment at a time. And every value knows its class — a plain number answers Integer.
01Variables appear the first time you assign them — no declarations.
02puts prints any value and adds a newline.
0342 is an Integer, 3.14 a Float, "text" a String, :word a Symbol.
04true, false and nil are values too — nil means "nothing here".
05Ask any value for .class to see what it is.