Class: Contracts::Builtin::Bool

Inherits:
Object
  • Object
show all
Defined in:
lib/contracts/builtin_contracts.rb

Class Method Summary collapse

Class Method Details

.valid?(val) ⇒ Boolean

Returns:

  • (Boolean)


344
345
346
# File 'lib/contracts/builtin_contracts.rb', line 344

def self.valid?(val)
  val.is_a?(TrueClass) || val.is_a?(FalseClass)
end