Module: Cinnabar::StrToPath::Refin

Defined in:
lib/cinnabar/path.rb

Overview

Adds String#to_path via Ruby refinements (lexically scoped).

This avoids global monkey patches. The method is only visible within scopes where using Cinnabar::StrToPath::Refin is active.

Examples:


using Cinnabar::StrToPath::Refin

__dir__.to_path
# Same as `Pathname(__dir__)`