method

children

ruby latest stable - Class: Dir

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

children()
public

Returns an array containing all of the filenames except for “.” and “..” in this directory.

d = Dir.new("testdir")
d.children   #=> ["config.h", "main.rb"]