Module: ValueSemantics::Bool

Defined in:
lib/value_semantics/bool.rb

Overview

Validator that only matches ‘true` and `false`

Class Method Summary collapse

Class Method Details

.===(value) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/value_semantics/bool.rb', line 7

def self.===(value)
  true.equal?(value) || false.equal?(value)
end