Parent

Methods

Templater::Actions::File

Public Instance Methods

invoke!() click to toggle source

Renders the template and copies it to the destination.

# File lib/merb-gen/templater.rb, line 25
def invoke!
  callback(:before)
  ::FileUtils.mkdir_p(::File.dirname(destination))
  ::FileUtils.rm_rf(destination)
  ::FileUtils.cp_r(source, destination)
  callback(:after)
end
revoke!() click to toggle source

removes the destination file

# File lib/merb-gen/templater.rb, line 34
def revoke!
  ::FileUtils.rm_r(destination, :force => true)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.