Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Programming By Contract with Ruby

Reply
Thread Tools

Programming By Contract with Ruby

 
 
Pete Hodgson
Guest
Posts: n/a
 
      09-11-2008
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

 
Reply With Quote
 
 
 
 
Dean Wampler
Guest
Posts: n/a
 
      09-11-2008
[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

On Thu, Sep 11, 2008 at 11:53 AM, Pete Hodgson <> wrote:

> 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

 
Reply With Quote
 
 
 
 
Daniel Berger
Guest
Posts: n/a
 
      09-11-2008
On Sep 11, 10:53*am, Pete Hodgson <phodg...@lyris.com> wrote:
> 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


http://rubyforge.org/projects/rubydbc/
http://rubyforge.org/projects/dbc/

Regards,

Dan
 
Reply With Quote
 
Pete Hodgson
Guest
Posts: n/a
 
      09-11-2008
[Note: parts of this message were removed to make it a legal post.]

Thanks Dan.

Looks like dbc is actually a Design By Contract system for C, using ruby
and Racc to parse an external DSL:
http://www.onlamp.com/pub/a/onlamp/2...ract_in_c.html.

I'll take a look at rubydbc. Anyone else have any input?

Daniel Berger wrote:
> On Sep 11, 10:53 am, Pete Hodgson <phodg...@lyris.com> wrote:
>
>> 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
>>

>
> http://rubyforge.org/projects/rubydbc/
> http://rubyforge.org/projects/dbc/
>
> Regards,
>
> Dan
>
>


 
Reply With Quote
 
Jörg W Mittag
Guest
Posts: n/a
 
      09-11-2008
Daniel Berger wrote:
> On Sep 11, 10:53*am, Pete Hodgson <phodg...@lyris.com> wrote:
>> 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.

> http://rubyforge.org/projects/rubydbc/
> http://rubyforge.org/projects/dbc/


There's also <https://RubyForge.Org/projects/handshake/>. I have no
experience with any of those three, but I like the clever name (-:

jwm
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby and Contract Programming (was Ruby vs. Ada) Robert Dober Ruby 4 04-22-2008 07:35 PM
VHDL and Verilog - 15 x Contract Engineers Required Urgently - Long Term Contract Specialist Verilog Engineers Roles VHDL 0 06-27-2007 01:09 PM
5 Ruby on Rails Developers - Contract to Hire or Contract - Washington, DC Job Hunter Ruby 0 09-06-2006 12:56 PM
Seek Contract Programming Work - 17 Years Experience Michael D. Crawford Java 0 02-22-2005 11:42 PM
Looking for a contract or freelance programming or design job? CorporateRebel.com HTML 2 05-02-2004 05:00 PM



Advertisments