Module: Typecheck
- Defined in:
- lib/typecheck.rb
Defined Under Namespace
Classes: SignatureCompiler
Constant Summary collapse
- VERSION =
'0.1.2'
- TypeError =
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#typecheck(signature, method) ⇒ Object
4 5 6 7 |
# File 'lib/typecheck.rb', line 4 def typecheck(signature, method) alias_method "#{method}_unchecked", method define_method method, &SignatureCompiler.new.call(signature, method) end |