Module: Kernel

Defined in:
lib/pathname2.rb

Overview

Re-open the Kernel module to add some global methods.

Instance Method Summary collapse

Instance Method Details

#Pathname2(path) ⇒ Object

Synonym for Pathname2.new



1128
1129
1130
# File 'lib/pathname2.rb', line 1128

def Pathname2(path)
  Pathname2.new(path)
end

#pnObject

Usage: pn{ path }

A shortcut for Pathname2.new



1122
1123
1124
# File 'lib/pathname2.rb', line 1122

def pn
  instance_eval{ Pathname2.new(yield) }
end