Created
January 29, 2013 20:15
-
-
Save capoferro/4667355 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hash.from_dotted_path(:'a.b.c', "value") | |
| #=> {:a => {:b => {:c => "value"}}} | |
| or | |
| #=> {"a" => {"b" => {"c" => "value"}}} | |
| # Passing a string as a first parameter will always return the second. Note that the first parameter in the example above is a Symbol. Wondering if this method should return what's passed in or return strings as keys always. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment