Sha256: 941139a9fe3286d1cc2c12c9c0c8477794d23e1e041f92c58258bd1b0e89ac01
Contents?: true
Size: 685 Bytes
Versions: 17
Compression:
Stored size: 685 Bytes
Contents
# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2019 Eric Crane. All rights reserved. # # Utility used to find objects. # module Gloo module Core class ObjFinder # # Find all objects in the given container that have # the given name. # If the container isn't provided, root will be used. # def self.by_name( name, container = nil ) container = $engine.heap.root if container.nil? arr = [] container.children.each do |o| arr << o if o.name == name arr += by_name( name, o ) if o.child_count.positive? end return arr end end end end
Version data entries
17 entries across 17 versions & 1 rubygems