Systems | Development | Analytics | API | Testing

Ruby

How to Delegate Methods in Ruby

Delegation in programming refers to handing off a task from one part of a program to another. It's an essential technique in object-oriented programming, empowering clean, maintainable code by ensuring that each object or method is responsible for a specific task or behavior. Understanding and using delegation is key to mastering Ruby and other object-oriented languages. Delegation promotes separation of concerns, making your code more modular and easier to understand, test, and refactor.

Keep Your Ruby App Secure with Bundler

This article covers the use of bundler features to secure Ruby applications. In this day and age, we have to be more and more careful about software supply chain security. We'll show you how to start this journey by relying on a Gemfile and bundler to manage your project's dependencies. By the end of the post, you will better understand how bundler audit and bundler outdated work. Both can help you monitor the security state of your project's dependency tree. Let's dive in!

An Introduction to Lambdas in Ruby

Lambdas are a powerful programming construct used in many languages. These functions allow developers to write code that is more concise, efficient, and easier to maintain, making Lambdas an essential part of any developer's toolkit. In this article, we'll explore how you can use Lambda functions in Ruby to simplify your code and make it more powerful.

Efficiently Managing Ruby Memory Usage

Even the most prominent and reliable frameworks are notorious for burning out resources if not configured perfectly. In this post, we are about to take a look at how Ruby, one of the most prominent programming languages and an awesome web application alternative when combined with Rails, manages memory, and how you can make it perform even better. Ruby is a scripting language built for use in web applications and similar stuff.

Manage Your Ruby Logs Like a Pro

Logs are essential to any application's development. Most Ruby logs are verbose and chunky, so digging for exactly what you need can be difficult. Even though they contain useful information, you might not get as much value as you should from logs if you don't know how to use them effectively. In this article, we'll explore: Let's get started.

How to Load Code in Ruby

There are many ways to load code and access file-related constants in Ruby. We can create a clear architecture by separating and handling concerns into classes and pulling in only the classes we depend on. Many full-stack frameworks like Rails and Hanami offer a built-in method to access the classes we want, as long as we stick with a certain convention. How does this work? In this post, we will explore three different options for loading code: using load, require, and autoload.

How to Use the rodauth-omniauth Gem in Ruby

Setting up authentication for your Ruby app is important to ensure it is secure. In this post, we'll explore the rodauth-omniauth gem for Ruby to implement authentication in your app via third-party providers. First, let's quickly define authentication before exploring the benefits of OmniAuth and setting up the rodauth-omniauth gem for a Rails app. Let's dive straight in!