handshake 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.