# File lib/more/facets/hashbuilder.rb, line 73 def method_missing( sym, *args, &block ) sym = sym.to_s.downcase.chomp('=') if @hash.key?(sym) unless @flag[sym] @hash[sym] = [ @hash[sym] ] @flag[sym] = true end if block_given? @hash[sym] << self.__class__.new( &block ).to_h else @hash[sym] << args[0] end else if block_given? @hash[sym] = self.__class__.new( &block ).to_h else @hash[sym] = args[0] end end end