Class: Razor::RegularFile

Inherits:
GenerableFile show all
Defined in:
lib/razor/generable.rb

Instance Attribute Summary

Attributes inherited from Generable

#parent, #src_name

Instance Method Summary collapse

Methods inherited from GenerableFile

#contents, #dest_ext, #request

Methods inherited from Generable

#dest, #http, #initialize, #src, #url

Constructor Details

This class inherits a constructor from Razor::Generable

Instance Method Details

#dest_nameObject



114
115
116
117
118
# File 'lib/razor/generable.rb', line 114

def dest_name
	# delete first '~' if needed.
	super =~ /([^~].+)/
	return $1
end

#generateObject



120
121
122
# File 'lib/razor/generable.rb', line 120

def generate
	FileUtils.cp(src, dest)
end