hannibal-007 schrieb am 04.October.2009, 18:06:06 in der Kategorie web.coding
d = Dir.new(dir)
d.each do |x|
puts \"Got #{x}\"
end
Als Klasse nicht mehr, warum?
class File
def intialize dir
@d = Dir.new(dir)
end
def getDir
@d.each do |x|
puts \"Got #{x}\"
end
end
end
myfile = File.new \"/\"
myfile.getDir()