Blog

Page 594 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to run Rake tasks from within Rake tasks?
rake

How to run Rake tasks from within Rake tasks?

Published on September 2, 2023

🎉📝 How to run Rake tasks from within Rake tasks 🔄 Are you struggling to figure out how to run Rake tasks from within other Rake tasks? 🤔 Don't worry, you're not alone! It's a common challenge for many developers. But fear not, because in this blog pos

Cover Image for How to convert a unix timestamp (seconds since epoch) to Ruby DateTime?
datetimetimestamp

How to convert a unix timestamp (seconds since epoch) to Ruby DateTime?

Published on September 2, 2023

# Converting a Unix Timestamp to Ruby DateTime: A Quick and Easy Guide! 📅⌚️ Have you ever found yourself scratching your head, wondering how to convert a Unix timestamp (seconds since epoch) into a Ruby DateTime? Fret not! In this post, we'll unravel the

Cover Image for How to break out from a ruby block?

How to break out from a ruby block?

Published on September 2, 2023

# Breaking Out from a Ruby Block: Finding the Exit Route! 🚀 Ruby blocks are powerful constructs that allow us to encapsulate and iterate over code. However, sometimes we find ourselves trapped in a block and wonder how to break free, especially when enco

Cover Image for Difference between a class and a module
classmodule

Difference between a class and a module

Published on September 2, 2023

# The Class vs. Module Dilemma: Decoding the Mystery! 💡 Are you feeling a little lost in the world of Ruby after coming from Java? 🤔 Don't worry, my friend! I've got your back. 😎 Let's unravel the enigma of classes and modules together! 🧩 ## The Basi

Cover Image for When to use RSpec let()?

When to use RSpec let()?

Published on September 2, 2023

# When to use RSpec `let()`? 🤔 When writing tests using RSpec, you might have come across the `let()` helper method and wondered what it does and when to use it. In this blog post, we'll dive into the differences between using `let()` and instance varia

Cover Image for Determining type of an object in ruby
types

Determining type of an object in ruby

Published on September 2, 2023

## Understanding Object Types in Ruby: A Complete Guide 🧐💎 Ever wondered how to determine the type of an object in Ruby? 🤔 Whether you're a Ruby newbie or a seasoned developer, it's always good to have a solid understanding of object types. Let's dive

Cover Image for How to find a min/max with Ruby

How to find a min/max with Ruby

Published on September 2, 2023

# 🧐 How to find a min/max with Ruby Are you looking for a way to find the minimum or maximum value between two numbers in Ruby? 🤔 Look no further! In this guide, I'll show you how to easily find the min and max values using built-in functions in Ruby. L

Cover Image for Tell Ruby Program to Wait some amount of time
sleep

Tell Ruby Program to Wait some amount of time

Published on September 2, 2023

## 🕒 How to make your Ruby program wait 🕒 So, you want to make your Ruby program pause for a moment and catch its breath before moving on to the next line of code? Well, you've come to the right place! In this blog post, we'll explore some easy solution

Cover Image for What is Ruby"s double-colon `::`?
operatorssyntax

What is Ruby"s double-colon `::`?

Published on September 2, 2023

# Ruby's Double-Colon (::): Unlocking the Secrets of Scope and Accessibility 🕵️‍♂️ Hey there, tech enthusiasts! 👋 Are you baffled by the mysterious and ever-present double-colon (::) in Ruby code? 🤔 Don't fret, because today we're going to delve into t

Blog | Matheus Mello