Navigation Menu

Skip to content

Commit

Permalink
Adding doco
Browse files Browse the repository at this point in the history
  • Loading branch information
drekka committed Jul 2, 2011
1 parent 9c46508 commit 17da3a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReadMe.textile
Expand Up @@ -57,7 +57,7 @@ SIMapStepToSelector(@"Given Simon is working", simonIsRunning)
@end
</pre>

The first thing you wil notice is the inclusion of the SISimon.h header file. A necessary evil unfortunately. The second thing you will notice is the @SIMapStepToSelector(==no@=="Given Simon is working", simonIsRunning)@ line. That's Simon. This preprocessor directive instructs Simon to map the given step to the selector.
The first thing you wil notice is the inclusion of the SISimon.h header file. A necessary evil unfortunately. The second thing you will notice is the @SIMapStepToSelector(&amp;"Given Simon is working", simonIsRunning)@ line. That's Simon. This preprocessor directive instructs Simon to map the given step to the selector.

Now it's not obvious from the above, but that first parameter is a "regular expression":http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSRegularExpression_Class as specified in the doc for the "NSRegularExpression class":http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSRegularExpression_Class in Apple's documentation. This means that we can use it to pick up a wide variety of steps and also (using regular expression groups) pick out arguments to pass to the selector. Oh, and the second argument is the selector to execute. You don't need to use @@@selector(...)@ with this as Simon needs it as text. Plus it's less to type in :-)

Expand Down

0 comments on commit 17da3a6

Please sign in to comment.