Programming By Contract with Ruby

P

Pete Hodgson

Hi Folks,

Does anyone know of a Programming By Contract framework for ruby? It
seems like fertile ground, given the dynamic nature of the language. I'm
imagining some kind of DSL that allows a developer to annotate a
class/module with invariants, and also to annotate methods with pre- and
post-conditions.

Cheers,
Pete
 
D

Dean Wampler

[Note: parts of this message were removed to make it a legal post.]

I have an example on the Aquarium site of doing basic "design (programming)
by contract". Look near the bottom of this page for "Design by Contract":
http://aquarium.rubyforge.org/examples.html

dean

Hi Folks,

Does anyone know of a Programming By Contract framework for ruby? It seems
like fertile ground, given the dynamic nature of the language. I'm imagining
some kind of DSL that allows a developer to annotate a class/module with
invariants, and also to annotate methods with pre- and post-conditions.

Cheers,
Pete


--
Dean Wampler
http://www.objectmentor.com
http://www.aspectprogramming.com
http://aquarium.rubyforge.org
http://www.contract4j.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top