Class: File

Inherits:
Object show all
Extended by:
ActiveSupport::CoreExtensions::File::Atomic
Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file.rb,
lib/mack-facets/extensions/file.rb

Overview

:nodoc:

Class Method Summary collapse

Methods included from ActiveSupport::CoreExtensions::File::Atomic

atomic_write

Class Method Details

.join(*args) ⇒ Object

Join now works like it should! It calls .to_s on each of the args pass in. It handles nested Arrays, etc…



9
10
11
12
# File 'lib/mack-facets/extensions/file.rb', line 9

def join(*args)
  fs = [args].flatten
  _original_join(fs.collect{|c| c.to_s})
end

.join_from_here(*args) ⇒ Object



14
15
16
17
# File 'lib/mack-facets/extensions/file.rb', line 14

def join_from_here(*args)
  caller.first.match(/(.+):.+/)
  File.expand_path(File.join(File.dirname($1), *args))
end