%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/ARGF/
Upload File :
Create Path :
Current File : //proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/ARGF/cdesc-ARGF.ri

U:RDoc::NormalClass[iI"	ARGF:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"P+ARGF+ is a stream designed for use in scripts that process files given as ;TI"3command-line arguments or passed in via STDIN.;To:RDoc::Markup::BlankLineo;	;[I"MThe arguments passed to your script are stored in the +ARGV+ Array, one ;TI"Iargument per element. +ARGF+ assumes that any arguments that aren't ;TI":filenames have been removed from +ARGV+. For example:;T@o:RDoc::Markup::Verbatim;[
I"*$ ruby argf.rb --verbose file1 file2
;TI"
;TI"/ARGV  #=> ["--verbose", "file1", "file2"]
;TI")option = ARGV.shift #=> "--verbose"
;TI""ARGV  #=> ["file1", "file2"]
;T:@format0o;	;[I"PYou can now use +ARGF+ to work with a concatenation of each of these named ;TI"Jfiles. For instance, +ARGF.read+ will return the contents of _file1_ ;TI")followed by the contents of _file2_.;T@o;	;[I"LAfter a file in +ARGV+ has been read +ARGF+ removes it from the Array. ;TI"?Thus, after all files have been read +ARGV+ will be empty.;T@o;	;[	I"OYou can manipulate +ARGV+ yourself to control what +ARGF+ operates on. If ;TI"Qyou remove a file from +ARGV+, it is ignored by +ARGF+; if you add files to ;TI"M+ARGV+, they are treated as if they were named on the command line. For ;TI"
example:;T@o;;[
I"ARGV.replace ["file1"]
;TI"@ARGF.readlines # Returns the contents of file1 as an Array
;TI"ARGV           #=> []
;TI"%ARGV.replace ["file2", "file3"]
;TI">ARGF.read      # Returns the contents of file2 and file3
;T;0o;	;[I"MIf +ARGV+ is empty, +ARGF+ acts as if it contained STDIN, i.e. the data ;TI"'piped to your script. For example:;T@o;;[I",$ echo "glark" | ruby -e 'p ARGF.read'
;TI""glark\n";T;0:
@fileI"	io.c;T:0@omit_headings_from_table_of_contents_below0;
0;0[[[[I"Enumerable;To;;[;
@<;0I"	io.c;T[[I"
class;T[[:public[[:protected[[:private[[I"
instance;T[[;[;[I"	argv;T@D[I"binmode;T@D[I"
binmode?;T@D[I"
bytes;T@D[I"
chars;T@D[I"
close;T@D[I"closed?;T@D[I"codepoints;T@D[I"	each;T@D[I"each_byte;T@D[I"each_char;T@D[I"each_codepoint;T@D[I"each_line;T@D[I"eof;T@D[I"	eof?;T@D[I"external_encoding;T@D[I"	file;T@D[I"
filename;T@D[I"fileno;T@D[I"getbyte;T@D[I"	getc;T@D[I"	gets;T@D[I"inplace_mode;T@D[I"inplace_mode=;T@D[I"inspect;T@D[I"internal_encoding;T@D[I"lineno;T@D[I"lineno=;T@D[I"
lines;T@D[I"	path;T@D[I"pos;T@D[I"	pos=;T@D[I"
print;T@D[I"printf;T@D[I"	putc;T@D[I"	puts;T@D[I"	read;T@D[I"read_nonblock;T@D[I"
readbyte;T@D[I"
readchar;T@D[I"
readline;T@D[I"readlines;T@D[I"readpartial;T@D[I"rewind;T@D[I"	seek;T@D[I"set_encoding;T@D[I"	skip;T@D[I"	tell;T@D[I"	to_a;T@D[I"	to_i;T@D[I"
to_io;T@D[I"	to_s;T@D[I"to_write_io;T@D[I"
write;T@D[;[[;[[[U:RDoc::Context::Section[i0o;;[;
0;0[@<@<cRDoc::TopLevel

Zerion Mini Shell 1.0