class Console::Resolver
def bind(names, &block)
@parameter names [Array(String)] The class names to bind.
If the class is not defined, the block will be called when the class is defined, using a trace point.
If the class is already defined, the block will be called immediately.
Bind the given class names to the given block. When the class name is resolved into an actual class, the block will be called with the class as an argument.
def bind(names, &block) names.each do |name| if klass = Object.const_get(name) rescue nil yield klass else @names[name] = block end end if @names.any? @trace_point.enable else @trace_point.disable end end