class ZSTDS::Validation

ZSTDS::Validation class.

Public Class Methods

validate_bool(value) click to toggle source

Raises error when value is not boolean.

# File lib/zstds/validation.rb, line 10
def self.validate_bool(value)
  raise ValidateError, "invalid bool" unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass)
end
validate_integer(value) click to toggle source

Raises error when value is not integer.

# File lib/zstds/validation.rb, line 15
def self.validate_integer(value)
  raise ValidateError, "invalid integer" unless value.is_a? ::Integer
end