Class: Contracts::Builtin::Int
- Inherits:
-
Object
- Object
- Contracts::Builtin::Int
- Defined in:
- lib/contracts/builtin_contracts.rb
Overview
Check that an argument is an Integer
.
Class Method Summary collapse
Class Method Details
.valid?(val) ⇒ Boolean
42 43 44 |
# File 'lib/contracts/builtin_contracts.rb', line 42 def self.valid?(val) val && val.is_a?(Integer) end |