Topics
Ruby
About this topic: Articles tagged __TAG__
Showing 109 articlesRelated tags
Topics
Articles
Showing 109 articles
How-tos
How to Write Multi-Line String in Ruby
Learn how to write multi-line strings in Ruby with this comprehensive guide. Explore various methods including heredoc, string interpolation, array join, and concatenation, each …
↗
How-tos
Enum in Ruby
This article explores how to use enums in Ruby, detailing their definition, advantages, and best practices. Learn to enhance your code readability and maintainability by managing …
↗
How-tos
How to Get Object Type using kind_of, instance_of, and is_a In Ruby
This article explores how to check the type of an object in Ruby using the methods kind_of?, instance_of?, and is_a?. Learn the differences between these methods with clear …
↗
How-tos
for vs each in Ruby
Explore the differences between for and each in Ruby in this comprehensive guide. Discover when to use each iteration method, their syntax, performance considerations, and how they …
↗
How-tos
How to Accept User Input With Gets in Ruby
This tutorial explains how to accept user input with gets and sanitize with chomp in Ruby. Learn the essential techniques for capturing and validating user input, ensuring your …
↗
How-tos
How to Write to a File in Ruby
This article shows how to write to a file in Ruby, exploring methods like File.open, File.write, and IO
↗
How-tos
How to Update Ruby Version in macOS
This article shows how to update Ruby version in macOS using Homebrew, Rbenv, and RVM. Learn the steps to manage Ruby versions effectively, ensuring compatibility with the latest …
↗
How-tos
How to Parse a JSON String in Ruby
This article provides a comprehensive guide on how to parse a JSON string in Ruby. Learn about the built-in JSON library, error handling, and working with nested structures to …
↗
How-tos
require vs include in Ruby
Explore the differences between require and include in Ruby with this comprehensive guide. Learn how to effectively use each method to manage dependencies and share functionality …
↗
How-tos
How to Use the call() Method in Ruby
This article explains how to use the call method in Ruby, focusing on its application with procs and lambdas. You'll learn how to invoke these closures effectively, understand …
↗
How-tos
How to Use the inject Method in Ruby
This article demonstrates the different uses of the inject method in Ruby. Learn how to sum numbers, concatenate strings, build hashes, and work with custom objects using this …
↗
How-tos
How to Use Safe Navigation in Ruby
This tutorial illustrates how to utilize safe navigation in Ruby, a feature that simplifies accessing object properties without raising errors. Learn about the safe navigation …
↗
How-tos
How to Handle Exceptions Using Begin and Rescue in Ruby
This article discusses how to handle exceptions using begin and rescue in Ruby. Discover the basics of exception handling, learn to manage multiple exceptions, ensure cleanup with …
↗
How-tos
Difference Between Class and Class Instance Variables in Ruby
This article explores the difference between class and class instance variables in Ruby. Understand their unique characteristics, use cases, and how to leverage them effectively in …
↗
How-tos
The send Method in Ruby
This article explores the send method in Ruby, detailing its usage and benefits. Learn how to invoke methods dynamically, improve code readability, and access private methods with …
↗
How-tos
How to Generate Random Number in Ruby
This tutorial provides a comprehensive guide on how to generate random numbers in Ruby. Learn about the different methods available, including using the Random class and …
↗
How-tos
Difference Between Each_with_index and each.with_index in Ruby
This tutorial explores the difference between each_with_index and each.with_index in Ruby. Learn how to iterate through arrays while accessing element indices, complete with code …
↗
How-tos
The Binary Left Shift Operator in Ruby
This article introduces the binary left shift operator (<<) in Ruby, explaining its syntax, practical applications, and how it enhances coding efficiency. Discover how to …
↗
How-tos
How to Combined Comparison Operator <=> in Ruby
This tutorial demonstrates how to use the combined comparison operator <=> in Ruby. Learn about its functionality, applications in sorting arrays, and how to implement it in custom …=>
↗
How-tos
How to Use the Freeze Method in Ruby
This tutorial demonstrates how the freeze method in Ruby works. Learn to manage object mutability effectively with practical examples and explanations. Discover how freezing …
↗
How-tos
Assertions in Ruby
This tutorial explores assertions in Ruby, explaining their importance in testing and how to implement them using popular frameworks like RSpec and Minitest. Learn best practices …
↗
How-tos
YAML in Ruby
This tutorial demonstrates how YAML works in Ruby, covering how to read, write, and manipulate YAML files effectively. Learn the importance of YAML in Ruby applications and enhance …
↗
How-tos
How to Change Ruby Version on Mac
Learn how to change the Ruby version on your Mac effortlessly. This comprehensive guide covers methods using RVM, rbenv, and Bundler, ensuring you can switch Ruby versions based on …
↗
How-tos
The or Operator in Ruby
This tutorial demonstrates how to use the or operator in Ruby. Learn about its syntax, functionality, and practical applications in your Ruby projects. Discover how to combine …
↗
No articles found
Try clearing the filters.