File: //usr/local/rvm/gems/ruby-3.0.2/doc/thor-1.1.0/ri/Thor/Actions/directory-i.ri
U:RDoc::AnyMethod[iI"directory:ETI"Thor::Actions#directory;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KCopies recursively the files from source directory to root directory. ;TI"MIf any of the files finishes with .tt, it's considered to be a template ;TI"Hand is placed in the destination without the extension .tt. If any ;TI"Nempty directory is found, it's copied and all .empty_directory files are ;TI"Jignored. If any file name is wrapped within % signs, the text within ;TI"Mthe % signs will be executed as a method and replaced with the returned ;TI"Cvalue. Let's suppose a doc directory with the following files:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"
doc/
;TI"# components/.empty_directory
;TI" README
;TI" rdoc.rb.tt
;TI" %app_name%.rb
;T:@format0o;
; [I"When invoked as:;T@o;; [I"directory "doc"
;T;
0o;
; [I"JIt will create a doc directory in the destination with the following ;TI"Jfiles (assuming that the `app_name` method returns the value "blog"):;T@o;; [
I"
doc/
;TI" components/
;TI" README
;TI" rdoc.rb
;TI" blog.rb
;T;
0o;
; [I"^<b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can ;TI"Yexpand %something%, this `something` should be a public method in the class calling ;TI"U#directory. If a method is private, Thor stack raises PrivateMethodEncodedError.;T@S:RDoc::Markup::Heading:
leveli : textI"Parameters;To:RDoc::Markup::List:
@type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"source<String>;T; [o;
; [I"*the relative path to the source root.;To;;[I"destination<String>;T; [o;
; [I"/the relative path to the destination root.;To;;[I"config<Hash>;T; [o;
; [ I"3give :verbose => false to not log the status. ;TI"BIf :recursive => false, does not look for paths recursively. ;TI"DIf :mode => :preserve, preserve the file mode from the source. ;TI"TIf :exclude_pattern => /regexp/, prevents copying files that match that regexp.;T@S;;i ;I"
Examples;T@o;; [I"directory "doc"
;TI"1directory "doc", "docs", :recursive => false;T;
0:
@fileI""lib/thor/actions/directory.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(source, *args, &block);T@TFI"Actions;TcRDoc::NormalModule00