Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move resetStack as reset in CoreDataStack #75

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Move resetStack as reset in CoreDataStack #75

merged 2 commits into from
Apr 28, 2016

Conversation

Liquidsoul
Copy link
Collaborator

Pull request checklist

This fixes resetStack part of issue #69

What's in this pull request?

  • resetStack is now a static method of CoreDataStackFactory

@jessesquires jessesquires added this to the 4.0.0 milestone Apr 27, 2016
@jessesquires
Copy link
Owner

Thanks @Liquidsoul ! 🎉

Annnd, I'm dumb. Looking at this, I was thinking "this feels weird." Then, I realized that this makes more since as an instance method on CoreDataStack. What do you think?

We can update the method signature to: reset(onQueue queue: completion: )

Sorry for the churn! 😄

@Liquidsoul
Copy link
Collaborator Author

My bad, I should have listen to my fingers when I tried to remove the stack: argument and it did not work.
I should have stopped right there and think 😅
I'll change this.

@jessesquires
Copy link
Owner

Also, a quick note: this means the stack will pass itself to the completion block. Might be a bit odd, but I think this is good. Then you won't have to capture the stack in the closure via self.stack if you need to do extra work after the reset.

@Liquidsoul
Copy link
Collaborator Author

Just updated and rebased the branch. Do you want me to squash the commits together?

@jessesquires
Copy link
Owner

Looks awesome! 🎉 I'll squash via github. 👍

@jessesquires jessesquires merged commit 24f06a4 into jessesquires:develop Apr 28, 2016
@jessesquires jessesquires changed the title Move resetStack to CoreDataStackFactory Move resetStack as reset in CoreDataStack Apr 28, 2016
@Liquidsoul Liquidsoul deleted the issue_69_resetStack branch April 28, 2016 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants