Sha256: dc0b09d3cc1fe0af2d0a9283f8938096e4c178364c6e01766bd872f1a9867aa5
Contents?: true
Size: 631 Bytes
Versions: 7
Compression:
Stored size: 631 Bytes
Contents
module FunWith module Files module RootPathExtensions def root( *args ) if args.length > 0 args.unshift( @root_path ) FilePath.new( *args ) else FilePath.new( @root_path ) end end def set_root_path( path ) @root_path = FunWith::Files::FilePath.new( path ) end end class RootPath def self.rootify( target, path ) raise "#{target} already responds to :root" if target.respond_to?(:root) target.extend( RootPathExtensions ) target.set_root_path( FilePath.new( path ) ) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems