Class: Contracts::Builtin::Int

Inherits:
Object
  • Object
show all
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

Returns:

  • (Boolean)

48
49
50
# File 'lib/contracts/builtin_contracts.rb', line 48

def self.valid? val
  val.is_a?(Integer)
end