Class: Pathname

Inherits:
Object show all
Extended by:
ActiveSupport::CoreExtensions::Pathname::CleanWithin
Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb,
lib/gems/extlib-0.9.9/lib/extlib/pathname.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from ActiveSupport::CoreExtensions::Pathname::CleanWithin

clean_within

Instance Method Details

#/(path) ⇒ Pathname

Append path segments and expand to absolute path

file = Pathname(Dir.pwd) / "subdir1" / :subdir2 / "filename.ext"

Parameters:

  • path (Pathname, String, #to_s)

    path segment to concatenate with receiver

Returns:

  • (Pathname)

    receiver with path appended and expanded to an absolute path



12
13
14
# File 'lib/gems/extlib-0.9.9/lib/extlib/pathname.rb', line 12

def /(path)
  (self + path).expand_path
end