Sha256: 0f7cd88d9283e778843d3a2446a8e6636b7ea44d4872bf2510d3bcda79973247
Contents?: true
Size: 353 Bytes
Versions: 2
Compression:
Stored size: 353 Bytes
Contents
module Plezi module Base module Helpers # a proc that allows Hashes to search for key-value pairs while also converting keys from objects to symbols and from symbols to strings. # # (key type agnostic search Hash proc) HASH_SYM_PROC = Proc.new {|h,k| k = (Symbol === k ? k.to_s : k.to_s.to_sym); h[k] if h.has_key?(k) } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
plezi-0.10.2 | lib/plezi/helpers/magic_helpers.rb |
plezi-0.10.1 | lib/plezi/helpers/magic_helpers.rb |