Sha256: 91ef87d10f614e0e6cd7edb3cfcb4ab340939d204f1c3fb9f1c4a3c06a2ed454

Contents?: true

Size: 1.76 KB

Versions: 12

Compression:

Stored size: 1.76 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:foreach:@docstringIC:YARD::Docstring"ôCalls the block once for each entry in the named directory, passing
the filename of each entry as a parameter to the block.

   Dir.foreach("testdir") {|x| puts "Got #{x}" }

<em>produces:</em>

   Got .
   Got ..
   Got config.h
   Got main.rb
:@objectu:YARD::StubProxyDir.foreach:
@summary0:	@all":Calls the block once for each entry in the named directory, passing
the filename of each entry as a parameter to the block.

   Dir.foreach("testdir") {|x| puts "Got #{x}" }

<em>produces:</em>

   Got .
   Got ..
   Got config.h
   Got main.rb



@overload foreach( dirname )
  @yield [ filename ]
  @return [nil]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Dir.foreach;;;IC;	"
;
u;Dir.foreach;0;
"&@yield [ filename ]
@return [nil];[;[o:YARD::Tags::Tag
;
0;0:@types["
filename:
@text":@tag_name"
yieldo;
;
0;0;["nil;";"return;0:@parameters[[:dirname0;0:@signature"foreach( dirname );"
overload:@current_file_has_commentsF:@scope:
class;[:@docstring_extra0:@files[["
dir.c0:@namespaceu;Dir:
@path"Dir.foreach;[:@visibility:public:@source"J/*
 *  call-seq:
 *     Dir.foreach( dirname ) {| filename | block }  => nil
 *
 *  Calls the block once for each entry in the named directory, passing
 *  the filename of each entry as a parameter to the block.
 *
 *     Dir.foreach("testdir") {|x| puts "Got #{x}" }
 *
 *  <em>produces:</em>
 *
 *     Got .
 *     Got ..
 *     Got config.h
 *     Got main.rb
 *
 */
static VALUE
dir_foreach(io, dirname)
    VALUE io, dirname;
{
    VALUE dir;

    RETURN_ENUMERATOR(io, 1, &dirname);
    dir = dir_open_dir(dirname);
    rb_ensure(dir_each, dir, dir_close, dir);
    return Qnil;
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Dir/foreach_c.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Dir/foreach_c.dat