method

merge_collections

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: RDoc::ClassModule
merge_collections(mine, other, other_files, &block) public

Merges collection mine with other preferring other. other_files is used to help determine which items should be deleted.

Yields whether the item should be added or removed (true or false) and the item to be added or removed.

merge_collections things, other.things, other.in_files do |add, thing|
  if add then
    # add the thing
  else
    # remove the thing
  end
end
Show source
Register or log in to add new notes.