# Is there any package , library for "Design by Contract"?

**URL:** <https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518>\
**Category:** Ruby\
**Created:** [December 6, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518 "2006-12-06T14:41:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashkan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@ashkan](https://www.ruby-forum.com/u/ashkan)\
**Post date:** [December 6, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518/1 "2006-12-06T14:41:09Z")

</div>

Hi all,  
This is my first post here. As you know the “Design by contract”  
subject is not new. It is specially in attention in Eiffel and also  
there are many java libraries as iContract for this purpose.  
I want to know is there any equivalent feature in Ruby?

---

<div class="post-metadata">

**Author:** ![ashkan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@ashkan](https://www.ruby-forum.com/u/ashkan)\
**Post date:** [December 6, 2006, 2:57pm UTC](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518/2 "2006-12-06T14:57:36Z")

</div>

On Wed, Dec 06, 2006 at 10:41:12PM +0900, Ashkan Roshanayi wrote:

> Hi all,  
> This is my first post here. As you know the “Design by contract”  
> subject is not new. It is specially in attention in Eiffel and also  
> there are many java libraries as iContract for this purpose.  
> I want to know is there any equivalent feature in Ruby?

Yep. Check rubyforge, I believe you have multiple options.

---

<div class="post-metadata">

**Author:** ![ashkan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@ashkan](https://www.ruby-forum.com/u/ashkan)\
**Post date:** [December 6, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518/3 "2006-12-06T22:12:26Z")

</div>

Here is another that works pretty well:

[http://split-s.blogspot.com/2006/02/design-by-contract-for-ruby.html](http://split-s.blogspot.com/2006/02/design-by-contract-for-ruby.html)

-Brian
