9 10 11 12 13
# File 'lib/util.rb', line 9 def to_h(&block) Hash[*self.collect { |v| [v, block.call(v)] }.flatten] end