Skip to content

Commit 3abf320

Browse files
authored
One execute method
1 parent 72dff50 commit 3abf320

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

_posts/2020-06-24-the-command-pattern.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Worth noting that as written, if the user doesn’t make a selection, the comman
155155
Here's a couples rules I try to follow:
156156

157157
* Implement an instance method called `execute` (`call` is also a popular choice, but I don't use it because it makes me think of `block.call`)
158+
* You only get one `execute` method (if you need another, make another command)
158159
* The command doesn't expose instance methods that take arguments (this means you need to pass something smarter into the constructor)
159160

160161
So, assuming we got past our validations, how does one cancel a subscription?

0 commit comments

Comments
 (0)