Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/lab42/core/file.rb

Class Method Summary collapse

Class Method Details

.expand_local_path(*args, &blk) ⇒ Object

Raises:

  • (ArgumentError)


2
3
4
5
6
7
# File 'lib/lab42/core/file.rb', line 2

def expand_local_path *args, &blk
  raise ArgumentError, 'need a block to determine source location' unless blk
  values = args + Array( blk.() )
  expand_path File.join( '..', values.compact), blk.source_location.first
  
end