Logo: Relish

  1. Sign in

Project: Contracts-ruby

Contracts-ruby

contracts.ruby brings code contracts to the Ruby language.

Example:

class Example
  include Contracts::Core
  C = Contracts

  Contract C::Num, C::Num => C::Num
  def add(a, b)
    a + b
  end
end

This documentation is open source. If you find it incomplete or confusing, please submit an issue, or, better yet, a pull request.

Topics

  1. Basics
  2. Builtin contracts

Last published almost 3 years ago by waterlink.