Skip to content

Commit

Permalink
Updated read me with info for new objection_require_sel and updated p…
Browse files Browse the repository at this point in the history
…od spec file
  • Loading branch information
Pawel Dudek committed Jul 18, 2013
1 parent 52a1c96 commit 6d9f953
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objection.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pod::Spec.new do |s|
s.name = 'Objection'
s.version = '1.0.0'
s.version = '1.0.1'
s.summary = 'A lightweight dependency injection framework for Objective-C.'
s.author = { 'Justin DeWind' => '[email protected]' }
s.source = { :git => 'https://github.com/atomicobject/objection.git', :tag => '1.0.0' }
s.source = { :git => 'https://github.com/atomicobject/objection.git', :tag => "#{s.version}" }
s.homepage = 'http://www.objection-framework.org'
s.source_files = 'Source'
s.license = "https://github.com/atomicobject/objection/blob/master/LICENSE"
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ objection_requires(@"engine", @"brakes")
@synthesize engine, brakes, awake;
@end
```
#### Defining dependencies with selectors

You can alternatively use selectors to define dependencies. This is a more convenient way as it will generate a warning if a given selector is not visible in current scope.

#### Example

```objective-c
@implementation Car
objection_requires_sel(@selector(engine), @selector(brakes))
@synthesize engine, brakes, awake;
@end
```

### Fetching Objects from Objection

An object can be fetched from objection by creating an injector and then asking for an instance of a particular class or protocol. An injector manages its own object context. Which means that a singleton is per injector and is not necessarily a *true* singleton.
Expand Down

0 comments on commit 6d9f953

Please sign in to comment.