Sha256: 724e23334ad51cfd9a85ecc01d60db50ee5ed20c6c16c6c6ab0f3bad41478c3b
Contents?: true
Size: 170 Bytes
Versions: 6
Compression:
Stored size: 170 Bytes
Contents
class Array def to_proc ->(h) { length == 1 ? h[first] : h.values_at(*self) } end end #credit: http://thepugautomatic.com/2014/11/array-to-proc-for-hash-access/
Version data entries
6 entries across 6 versions & 1 rubygems