IsAssertions
Add assertions to your code in a very simple and easy to read syntax.
Installation
Add this line to your application's Gemfile:
gem 'is_assertions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install is_assertions
Usage
require 'is_assertions'
class Thing
include IsAssertions
def initialize(name, age)
is name, String
is age, Fixnum
@name = name
end
end
# doesn't raise an error
Thing.new("John", 18)
# raises an errorj
Thing.new(123, 18)