Class: DotMe::File

Inherits:
Incubator show all
Defined in:
lib/dotme/incubators/file.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Incubator

cells, incubate, #initialize, register!

Constructor Details

This class inherits a constructor from DotMe::Incubator

Class Method Details

.incubates?(path) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/dotme/incubators/file.rb', line 11

def self.incubates?(path)
  ::File.file? path
end

Instance Method Details

#incubate(to) ⇒ Object



5
6
7
8
9
# File 'lib/dotme/incubators/file.rb', line 5

def incubate(to)
  FileUtils.cp_r @path, ::File.join( to, @basename ) 

  { :link => @basename, :to => ::File.join( '~', @relative ) }
end