Tag: ruby
All the articles with the tag "ruby".
-
Module Functions in Ruby: module_function vs extend self
Updated:In Ruby, modules can provide both namespacing and mixin functionality. Learn how to define module-level functions using module_function and extend self, and the differences between them.
-
Magic Comments in Ruby
Updated:Ruby supports file-level 'magic comments' that instruct the interpreter—most famously for source encoding, but also for freezing strings, shareable constants, and indentation warnings.
-
Working with Files in Ruby
Updated:Learn the basics of working with files in Ruby: opening, reading, writing, streaming, and querying file objects efficiently.
-
Loading CSV Data in Rails: Then vs Now
Updated:A look back at how Rails 2.x apps loaded CSV data into models, and how modern Rails apps can do it more efficiently today.
-
Keeping Array Elements Unique in Ruby
Updated:Explore different ways to keep arrays unique in Ruby—using `uniq`, `uniq!`, and the `|` operator.