Class: Kosi::Validators::RowType
- Inherits:
-
Object
- Object
- Kosi::Validators::RowType
- Defined in:
- lib/kosi/validators/row_type_validator.rb
Overview
RowType Validator if row class is not Array, fail ArgumentError.
Constant Summary collapse
- INVALID_ROW_MESSAGE =
'invalid row class %s. row class must be Array.'
Class Method Summary collapse
Class Method Details
.validate(row) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/kosi/validators/row_type_validator.rb', line 11 def self.validate(row) unless row.is_a?(Array) = format(INVALID_ROW_MESSAGE, row.class) fail ArgumentError, end end |