Module: IsAssertions
- Defined in:
- lib/is_assertions.rb,
lib/is_assertions/version.rb
Defined Under Namespace
Classes: IsAssertionsError
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
Instance Method Details
#is(value, type) ⇒ Object
6 7 8 9 10 |
# File 'lib/is_assertions.rb', line 6 def is(value, type) if !value.is_a?(type) raise IsAssertionsError, "value #{value.inspect} must be of type #{type}", caller(1) end end |