Skip to content

Commit

Permalink
small update to README
Browse files Browse the repository at this point in the history
reference injector through property accessor
  • Loading branch information
jdewind committed Mar 29, 2011
1 parent fc8f0c0 commit 851a937
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -65,7 +65,7 @@ A global injector can be registered with Objection which can be used throughout

### Registering Instances

Objection supports associating an object outside the context of Objection by configuring an ObjectionModule. You can also mark registered [singleton] classes as eager singletons. Eager singletons will be instantiated during the creation of the injector rather than being lazily instantiated.
Objection supports associating an object outside the context of Objection by configuring an ObjectionModule. You can also mark registered singleton classes as eager singletons. Eager singletons will be instantiated during the creation of the injector rather than being lazily instantiated.

### Example
@interface MyAppModule : ObjectionModule {
Expand All @@ -88,9 +88,9 @@ Objection supports associating an object outside the context of Objection by con

### Meta Class Bindings

There are times when a dependency -- usually external -- is implemented only using class methods. Objection can explicitly support binding to
There are times when a dependency -- usually external -- is implemented using only class methods. Objection can explicitly support binding to
the meta class instance through a protocol. This avoids having to unnecessarily create a wrapper class that passes through to the class
methods. The disadvantage, of course, is that it requires a protocol definition so that Objection knows how to bind the meta class to objects
methods. The catch, of course, is that it requires a protocol definition so that Objection knows how to bind the meta class to objects
in the injector context.

### Example
Expand Down
2 changes: 1 addition & 1 deletion Source/ObjectionEntry.m
Expand Up @@ -67,7 +67,7 @@ - (id)buildObject {
[desiredClassOrProtocol class];
}

id theObject = [_injector getObject:desiredClassOrProtocol];
id theObject = [self.injector getObject:desiredClassOrProtocol];

if(theObject == nil && propertyInfo.type == ObjectionTypeClass) {
[Objection registerClass:desiredClassOrProtocol lifeCycle: ObjectionInstantiationRuleEverytime];
Expand Down

0 comments on commit 851a937

Please sign in to comment.