tags:

views:

56

answers:

1

How could I refactor this code to use only one Dir[ ] call?

Dir[ File.join('.', 'directory_a'), '*' ] + Dir[ File.join('.', 'directory_b'), '*' ]
=> [ contents of directory_a and directory_b ]
+5  A: 
Dir['./{directory_a,directory_b}/*']
Avdi
Perfect! Thank you.
c00lryguy