module Dry::Importer
Constants
- NOOP
- VERSION
- WRAPPER_MAP
Public Instance Methods
import(target, namespace)
click to toggle source
# File lib/dry/importer.rb, line 13 def import(target, namespace) namespace.constants(false).each do |constant| namespace.const_get(constant).tap do |const| ns = target.const_set(constant, WRAPPER_MAP.fetch(const.class, NOOP).call(const)) import(ns, const) if const.respond_to?(:constants) end end end