RuBAN-GT / justdi

Simple DI container

Home Page:https://github.com/RuBAN-GT/justdi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container sub-modules

RuBAN-GT opened this issue · comments

Implement container sub-modules like this:

sub_module = Justdi::SubModule.new do |register|
  register.call(:schema).use_class(Graphql::Schema) 
  register.call(:server).use_class(Graphql::Server)
end

container.import_module(sub_module)