module Bundler::Thor::Actions
def create_file(destination, *args, &block)
create_file "config/apache.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, *args, &block) config = args.last.is_a?(Hash) ? args.pop : {} data = args.first action CreateFile.new(self, destination, block || data.to_s, config) end