Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maldoinc committed Aug 24, 2024
1 parent dde3868 commit 9954730
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/pages/factory_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inheriting from the same base (See: [Strategy Pattern](https://en.wikipedia.org/
## Usage

In order for the container to inject these dependencies, you must register the factory function
by using the `@service` decorator or by calling `container.register(fn)` directly.
by using the `@service` decorator.

When the container needs to inject a dependency, it checks known factories to see if any of them can create it.

Expand Down
5 changes: 1 addition & 4 deletions docs/pages/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ Wireup does not enforce a code structure. Services may live anywhere in the appl
be registered with the container.
Top-level modules containing registrations must also be declared in the `initialize_container` call.

To register a class as a service you can use one of the following

* Decorate the class with `@service`.
* Call `container.register(YourService)` directly.
To register a class as a service you can decorate it with `@service` or `@abstract`.

### Lifetime
By default, the container will keep in memory only a single copy of each service.
Expand Down

0 comments on commit 9954730

Please sign in to comment.