Sha256: 81af02b3a1a18f1dc9102be9784b2829bffeafa8a0963e3fa324288080879cb7
Contents?: true
Size: 821 Bytes
Versions: 1
Compression:
Stored size: 821 Bytes
Contents
require 'thor/actions/templater' class Thor module Actions # Copies the file from the relative source to the relative destination. If # the destination is not given it's assumed to be equal to the source. # # ==== Parameters # source<String>:: the relative path to the source root. # destination<String>:: the relative path to the destination root. # config<Hash>:: give :verbose => false to not log the status. # # ==== Examples # # copy_file "README", "doc/README" # # copy_file "doc/README" # def copy_file(source, destination=nil, config={}) action CopyFile.new(self, source, destination || source, config) end class CopyFile < Templater #:nodoc: def render @render ||= ::File.read(source) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wycats-thor-0.11.1 | lib/thor/actions/copy_file.rb |