This website requires JavaScript.
Explore
Help
Sign In
smits
/
ruby-uebungen
Watch
1
Star
3
Fork
You've already forked ruby-uebungen
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
25d5ac7ffd
ruby-uebungen
/
Assignment_030
/
solution
/
readme.md
595 B
Raw
Blame
History
Lösung: Klasse Dir und IO
```ruby def print(f) n = 0 puts f, "\n" IO.foreach(f) do |line| puts "%4d %s" % [ n, line ] n += 1 end
puts "\n\n"
end
Dir.foreach('.') do |f| print f if /.*.txt$/ =~ f end