Method: MetaRuby::GUI::ModelHierarchy::Metadata#merge
- Defined in:
- lib/metaruby/gui/model_hierarchy.rb
#merge(other) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/metaruby/gui/model_hierarchy.rb', line 5 def merge(other) a, b = search_key, other.search_key.dup if a.size < b.size a, b = b, a end b.size.times do |i| a[i] |= b[i] end self.search_key = a self.categories = categories | other.categories end |