Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
configure / lib / configure / activate.rb
Size: Mime:
module Configure
  def self.activate(target_class=nil, factory_method: nil, constructor: nil)
    target_class ||= Object

    unless constructor.nil?
      factory_method = constructor
    end

    macro_module = Configure::Macro

    return if target_class.is_a? macro_module

    target_class.extend(macro_module)

    target_class.default_factory_method = factory_method
  end
end