# File lib/bee.rb, line 280 def extend(properties) current_list = @list current_hash = @hash @list = properties.list @hash = properties.hash index = 0 0.upto(current_list.length - 1) do |current| name = current_list[current] pos = @list.index(name) if pos sub = current_list[index .. current] @list[pos .. pos] = sub for name in sub @hash[name] = current_hash[name] end index = current + 1 end end tail = current_list[index .. current_list.length() - 1] @list += tail for name in tail @hash[name] = current_hash[name] end end