module Thor::Actions
def create_file(destination, data=nil, config={}, &block)
create_file "config/apach.conf", "your apache config"
end
"vhost.name = #{hostname}"
hostname = ask("What is the virtual hostname I should use?")
create_file "lib/fun_party.rb" do
==== Examples
config
data
destination
==== Parameters
which is the return value of a block or a data string.
Create a new file relative to the destination root with the given data,
def create_file(destination, data=nil, config={}, &block) action CreateFile.new(self, destination, block || data.to_s, config) end