Sha256: 12f7f72d83201458b67d70aa26a39526c8f8348b1de78eb433d23127da09a75a
Contents?: true
Size: 307 Bytes
Versions: 7
Compression:
Stored size: 307 Bytes
Contents
# would be nice to use refinements here, but that breaks 2.0 compatibility class Method def kwargs_as_hash( invocation_binding ) named_locals = parameters. \ select{|type,_| type == :key}. \ flat_map{|_,name| [name,invocation_binding.eval(name.to_s)]} Hash[ *named_locals ] end end
Version data entries
7 entries across 7 versions & 1 rubygems