I am aware of this feature provided by ActiveSupport.
h = ActiveSupport::OrderedOptions.new h.boy = \'John\' h.girl = \'Mary\' h.boy # => \'John\' h.girl # =
You are looking for OpenStruct
$ require 'ostruct' $ large_hash_obj = OpenStruct.new large_hash $ large_hash_obj.boy => "John"