rubyguides

Reference

Modules

Common Ruby modules and standard-library helpers.

  1. CSV

    Ruby's CSV module provides a complete toolkit for parsing, generating, and streaming comma-separated data with custom delimiters, headers, and encoding options.

  2. Date

    Learn Ruby's Date class for calendar date work. Create, parse, and manipulate dates; calculate differences between days; and iterate over date ranges.

  3. Dir

    Work with directories in Ruby to list files, navigate, create folders, inspect paths, and remove empty directories when needed.

  4. ERB

    Master ERB, Ruby's built-in template engine for embedding Ruby in HTML, config files, and email templates. Covers tags, trim modes, and security best practices.

  5. File

    Read, write, and inspect files with Ruby's File module. Covers File.read, File.write, path helpers, file permissions, and practical file management examples.

  6. FileUtils

    The FileUtils module handles file and directory operations in Ruby: copying, moving, and deleting. Covers cp, mv, rm, mkdir_p, chmod, and symlinks.

  7. JSON

    Parse and generate JSON data in Ruby with the standard library. Convert between Ruby objects and JSON strings for APIs, configuration, and serialization.

  8. Logger

    Use Ruby's Logger class for application logging with severity levels, multiple outputs, rotation, and custom formatting for debugging and production use.

  9. Net::HTTP

    Net::HTTP is Ruby's HTTP client library. Make HTTP requests, handle responses, and manage connections with the standard library.

  10. Readline

    Ruby's Readline module provides line-editing, command history, and tab completion for building polished interactive CLI tools with Emacs or Vi key bindings.

  11. Set

    Ruby Set provides unordered collections that reject duplicates and offer fast lookups. Covers creation, union, intersection, difference, and uses like tags.

  12. Time

    Master Ruby's Time class to create, parse, format, and manipulate date-and-time objects. Covers time zones, strftime directives, and safe time patterns.

  13. YAML

    Parse and generate YAML data in Ruby with the standard library module that wraps Psych. Learn how to load, inspect, and dump YAML safely.