hash = {}
array.each { |key| hash[key] = func(key) }

Ruby How to make it more idiomatic?

by AlekSi, August 16, 2010 11:58, 6 refactorings, tagged with ruby, idiomatic, idioms

Can you make this code more...

Af19cd0c0141bf7d6b42516706eb1d1d Talk
def archive_files(source, glob_mask, destination)
	Dir.glob(File.join(source, glob_mask)) do |file| 
		should_copy_file = true
...

Ruby Ruby Idioms

by jamesthigpen.myopenid.com, March 12, 2009 19:53, 6 refactorings, tagged with ruby, idiomatic, idioms

This works, but I feel like...

34b01f5a98983c70e7f6163014b94477 Talk