[ENGLISH VERSION] Classes 101: Methods

Hey, how are you? Like said on the first post of this serie, today we are going to know how we add new methods to our class, and so much more. Inside the method initialize we can have anything and today we are going to use it to "initialize" our variables. We use the @ … Continue lendo [ENGLISH VERSION] Classes 101: Methods



Hey, are you ok? As fundamental part of the programming languages, the loops allow us repeat a wide range of commands, saving work/time, being an important tool for all programmer. Ruby offers not many and today we're going to talk about them: while and until. WHILE Well known, while does something "while" it's codition is … Continue lendo [ENGLISH VERSION] Loops

[ENGLISH VERSION] Practical Guide: Spaceship Operator (<=>)

Hey, how are you?! Represented by <=>, the remarkeble Spaceship Operator works the same way, that his endings: like a comparison opertor, three-way comparison, being a key element in sorting methods. The little spaceship (got it?) counts with three types of comparision, always done from left to right, and can return three values as well: … Continue lendo [ENGLISH VERSION] Practical Guide: Spaceship Operator (<=>)