Topics

Ruby

About this topic: Articles tagged __TAG__

Showing 109 articles

Topics

Articles

Showing 109 articles

How-tos How to Convert a String to Lowercase or Uppercase in Ruby Learn how to convert strings to lowercase or uppercase in Ruby with simple methods. This article provides clear examples and explanations for both downcase and upcase, as well as … How-tos How to Read Lines of a Files in Ruby Learn how to read lines from a file in Ruby using two effective methods: File.readlines and File.foreach. This guide provides clear code examples and detailed explanations to help … How-tos The continue Keyword in Ruby This article explores the equivalent of the continue keyword in Ruby, focusing on the next keyword and other methods to manage loop iterations. Learn how to control flow … How-tos How to Use Pattern Matching Operator in Ruby Discover how to use the pattern matching operator in Ruby to simplify your code and enhance readability. This article covers its functionality, provides clear examples, and … How-tos How to Update Ruby Gems Learn how to update Ruby Gems efficiently with this comprehensive guide. Explore various methods to update RubyGems software and installed gems, complete with practical code … How-tos How to Get Maximum and Minimum Number in a Ruby Array Learn how to find the maximum and minimum numbers in a Ruby array with this comprehensive guide. Explore built-in methods like max and min, sorting techniques, and the Enumerable … How-tos Meaning of Ruby Question Mark ? Discover the meaning of the Ruby question mark and explore predicate methods and the ternary operator in this informative article. Learn how these features enhance code readability … How-tos How to Parse XML With Ruby This article provides a comprehensive guide on how to parse XML with Ruby using the Nokogiri gem. Learn how to extract data, modify XML files, and work with attributes efficiently … How-tos How to Install a Specific Verson for a Gem in Ruby Learn how to install a specific version of a gem in Ruby with our comprehensive guide. Explore various methods including command line installations and using Bundler. Ensure your … How-tos How to Filter an Array in Ruby Learn how to filter an array in Ruby with various methods like select, reject, and filter. This comprehensive guide provides clear code examples and detailed explanations for … How-tos Ruby Class Variables Discover the ins and outs of Ruby class variables in this informative article. Learn how to define and use class variables with the @@ prefix, and understand their role in managing … How-tos How to Compare Strings in Ruby Learn how to compare strings in Ruby using the double equal operator and the eql? method. This comprehensive guide provides clear examples and explanations, helping you understand … How-tos Difference Between require and require_relative in Ruby In this article, we explore the differences between require and require_relative in Ruby. Learn how to effectively manage dependencies in your Ruby applications with clear examples … How-tos Difference Between puts and print in Ruby Explore the key differences between puts and print in Ruby in this informative article. Learn how each method functions, their unique characteristics, and practical examples to … How-tos How to Check if a File Exists in Ruby This article discusses how to check if a file exists in a given file path in Ruby. Learn about various methods such as File.exist?, File.file?, and using the FileTest module, … How-tos How to Update Ruby With Homebrew Learn how to update Ruby using Homebrew with this comprehensive guide. We cover everything from checking your current Ruby version to managing multiple Ruby installations. Keep … How-tos 1e18 in Ruby Learn about 1E18 in Ruby, a large number represented in scientific notation. This article explains how to work with 1E18 using direct assignment, integer representation, and … How-tos %i and %I in Ruby This tutorial explores %i and %I in Ruby, two shorthand notations for creating arrays of symbols. Learn the differences, use cases, and best practices to enhance your Ruby … How-tos Ruby to_sym Function This comprehensive guide explores the Ruby to_sym function, detailing its benefits, common pitfalls, and best practices for use. Learn how to convert strings to symbols efficiently … How-tos How to Find Array Index in Ruby This comprehensive tutorial covers various methods to find array indices in Ruby, including index, each_with_index, find_index, and rindex. Learn how to efficiently locate elements … How-tos Literal for Double-Quoted Strings in Ruby This tutorial explores the literal for double-quoted strings in Ruby, highlighting their features like interpolation and special character sequences. Learn how to effectively use … How-tos How to Sleep for X Seconds in Ruby Learn how to sleep for a specified number of seconds in Ruby with our comprehensive guide. Explore different methods, including the simple sleep method, Thread.sleep for concurrent … How-tos How to Determine Object Type in Ruby In this article, we delve into how to check the type of an object in Ruby using different methods. How-tos How to Get Current Time in UTC in Ruby This tutorial demonstrates how Time.now in Ruby works to get current time.

← All topics