Module: Cinnabar::StrToPath::Ext

Defined in:
lib/cinnabar/path.rb

Overview

Implementation of the #to_path method intended to be mixed into String.

Instance Method Summary collapse

Instance Method Details

#to_pathPathname

Convert the receiver (a String) into a Pathname.

Examples:


"lib".to_path
#=> #<Pathname:lib>

Returns:

  • (Pathname)

    Pathname(self)



54
# File 'lib/cinnabar/path.rb', line 54

def to_path = ::Kernel.Pathname(self)