This file contains 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
# Allows you to build a Hash in a fashion very similar to Builder. Example: | |
# Fork of https://gist.github.com/360506 by BrentD with some enhancements | |
# | |
# HashBuilder.build! do |h| | |
# h.name "Nilesh" | |
# h.skill "Ruby" | |
# h.skill "Rails" # multiple calls of the same method will collect the values in an array | |
# h.location "Udaipur, India" do # If a block is given, first argument will be set as value for :name | |
# h.location do | |
# h.longitude 24.57 |