Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/corefoundation/extensions.rb
Overview
Ruby Hash class
Instance Method Summary collapse
-
#to_cf ⇒ CF::Dictionary
Converts the Hash to an mutable CF::Dictionary by calling ‘to_cf` on each key and value it contains.
Instance Method Details
#to_cf ⇒ CF::Dictionary
Converts the Hash to an mutable CF::Dictionary by calling ‘to_cf` on each key and value it contains
151 152 153 154 155 156 157 |
# File 'lib/corefoundation/extensions.rb', line 151 def to_cf CF::Dictionary.mutable.tap do |r| each do |k,v| r[k.to_cf] = v.to_cf end end end |