Module: Cinnabar::StrToPath

Defined in:
lib/cinnabar/path.rb

Overview

Note:

This feature relies on Ruby's Pathname class. Make sure require "pathname" is loaded before calling to_path.

Adds String#to_path as a convenience helper to convert strings into Kernel.Pathname.

This module supports two integration styles:

  • Mixin: globally extends String (monkey patch).
  • Refin: lexically-scoped extension via refinements.

Defined Under Namespace

Modules: Ext, Mixin, Refin