Module: ConvenientService::Support::DependencyContainer::Export
- Includes:
- Concern
- Included in:
- Common::Plugins::CanHaveUserProvidedEntity::Container, ConvenientService::Service::Plugins::CanHaveStubbedResults::Container, ConvenientService::Service::Plugins::HasJSendResult::Container, Container
- Defined in:
- lib/convenient_service/support/dependency_container/export.rb
Class Method Summary collapse
- .export(slug, scope: Constants::DEFAULT_SCOPE, &body) ⇒ ConvenientService::Support::DependencyContainer::Entities::Method
- .exported_methods ⇒ ConvenientService::Support::DependencyContainer::Entities::MethodCollection
Class Method Details
.export(slug, scope: Constants::DEFAULT_SCOPE, &body) ⇒ ConvenientService::Support::DependencyContainer::Entities::Method
30 31 32 33 34 |
# File 'lib/convenient_service/support/dependency_container/export.rb', line 30 def export(slug, scope: Constants::DEFAULT_SCOPE, &body) Commands::AssertValidScope.call(scope: scope) Entities::Method.new(slug: slug, scope: scope, body: body).tap { |method| exported_methods << method } end |
.exported_methods ⇒ ConvenientService::Support::DependencyContainer::Entities::MethodCollection
39 40 41 |
# File 'lib/convenient_service/support/dependency_container/export.rb', line 39 def exported_methods @exported_methods ||= Entities::MethodCollection.new end |