Sha256: adda00a3ea7eb6cb75de79d0f61c5994808c3d3635427f69416767ffe98ae9b0

Contents?: true

Size: 439 Bytes

Versions: 4

Compression:

Stored size: 439 Bytes

Contents

class File
  
  alias_class_method :join
  
  class << self
    
    # Join now works like it should! It calls .to_s on each of the args
    # pass in. It handles nested Arrays, etc...
    def join(*args)
      fs = [args].flatten
      _original_join(fs.collect{|c| c.to_s})
    end
    
    def join_from_here(*args)
      caller.first.match(/(.+):.+/)
      File.expand_path(File.join(File.dirname($1), *args))
    end
    
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mack-facets-0.8.1 lib/mack-facets/extensions/file.rb
mack-facets-0.8.2 lib/mack-facets/extensions/file.rb
mack-facets-0.8.3 lib/mack-facets/extensions/file.rb
mack-facets-0.8.3.1 lib/mack-facets/extensions/file.rb