handshake 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README DELETED
@@ -1,33 +0,0 @@
1
- == Handshake
2
-
3
- Handshake is an informal design-by-contract system written in pure Ruby.
4
- It's intended to allow Ruby developers to apply simple, clear constraints
5
- to their methods and classes. Handshake is written by Brian Guthrie
6
- (btguthrie@gmail.com) and lives at http://handshake.rubyforge.org.
7
-
8
- Here's an example of Handshake in action:
9
-
10
- class NonEmptyArray < Array
11
- include Handshake
12
- invariant { not empty? }
13
- end
14
-
15
- class NonEmptyStringArray < NonEmptyArray
16
- contract :initialize, [[ String ]] => anything
17
- contract :<<, String => self
18
- contract :+, many?(String) => self
19
- end
20
-
21
- Handshake can also define pre- and post-conditions on your methods.
22
-
23
- class Foo
24
- before do
25
- assert( not @widget.nil? )
26
- end
27
- def something_that_requires_widget
28
- ...
29
- end
30
- end
31
-
32
- See Handshake::ClassMethods for more documentation on exact syntax and
33
- capabilities.