Class: LZWS::Validation

Inherits:
ADSP::Validation
  • Object
show all
Defined in:
lib/lzws/validation.rb

Overview

LZWS::Validation class.

Class Method Summary collapse

Class Method Details

.validate_bool(value) ⇒ Object

Raises error when value is not boolean.

Raises:



10
11
12
# File 'lib/lzws/validation.rb', line 10

def self.validate_bool(value)
  raise ValidateError, "invalid bool" unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass)
end