Class: FunWith::Files::RootPath

Inherits:
Object
  • Object
show all
Defined in:
lib/fun_with/files/root_path.rb

Class Method Summary collapse

Class Method Details

.rootify(target, path) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/fun_with/files/root_path.rb', line 19

def self.rootify( target, path )
  if target.respond_to?(:root)
    warn( "#{target} already responds to :root, skipping installation" )
    return nil
  end
  
  target.extend( RootPathExtensions )
  target.set_root_path( FilePath.new( path ) )
end