As a Ruby method is — behind the scene — a message handler associated with a block of instructions that…
message handler
Ruby is a fully object-oriented programming language. But what does that really mean?
Ruby comes with a bunch of hook methods that allow you to manipulate classes, modules, and objects…
in this article, we’re going to explore the following topics:
The putsmethod implicitly calls the to_s method of the object passed as parameter (except for a String)
puts
to_s
String
class Factory def initialize @workers = { workers: [] } @machines = { machines: [] }…
In this article, we’re going to explore the following topics:
IRB.CurrentContext
As a Ruby on Rails Freelancer since few years now, I have been worked in a bunch of projects.
For each mission, the environment setup is very important as I’ve to be efficient quickly.
A case statement consists of an optional condition followed by zero or more when conditions. It returns the value of the first truthy when statement. Otherwise nil.
case
when
nil
str = case "match"when "match" then…