Class: Contracts::Builtin::Bool
- Inherits:
-
Object
- Object
- Contracts::Builtin::Bool
- Defined in:
- lib/contracts-ruby2/lib/contracts/builtin_contracts.rb,
lib/contracts-ruby3/lib/contracts/builtin_contracts.rb
Class Method Summary collapse
Class Method Details
.valid?(val) ⇒ Boolean
337 338 339 |
# File 'lib/contracts-ruby2/lib/contracts/builtin_contracts.rb', line 337 def self.valid? val val.is_a?(TrueClass) || val.is_a?(FalseClass) end |