Top Level Namespace
Defined Under Namespace
Modules: Capistrano Classes: Filter
Instance Method Summary collapse
-
#filter(*sources) ⇒ Object
:call-seq: filter(*source) => Filter.
Instance Method Details
#filter(*sources) ⇒ Object
:call-seq:
filter(*source) => Filter
Creates a filter that will copy files from the source directory(ies) into the target directory. You can extend the filter to modify files by mapping ${key} into values in each of the copied files, and by including or excluding specific files.
A filter is not a task, you must call the Filter#run method to execute it.
For example, to copy all files from one directory to another:
filter('src/files').into('target/classes').run
To include only the text files, and replace each instance of ${build} with the current date/time:
filter('src/files').into('target/classes').include('*.txt').using('build'=>Time.now).run
421 422 423 |
# File 'lib/capistrano/recipes/deploy/strategy/filter.rb', line 421 def filter(*sources) Filter.new.from(*sources) end |