Skip to content

Commit

Permalink
Merge pull request #1 from mjlazar/swift-public-init
Browse files Browse the repository at this point in the history
Make initializers public.
  • Loading branch information
dave256 committed Mar 27, 2015
2 parents 662fbef + 015f987 commit dac6435
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {

// MARK: - Life cycle methods

public
override init(entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext!) {
super.init(entity: entity, insertIntoManagedObjectContext: context)
}


public
convenience init(managedObjectContext: NSManagedObjectContext!) {
let entity = _<$managedObjectClassName$>.entity(managedObjectContext)
self.init(entity: entity, insertIntoManagedObjectContext: managedObjectContext)
Expand Down

0 comments on commit dac6435

Please sign in to comment.