Module: TableSchema::Constraints::Enum
- Included in:
- TableSchema::Constraints
- Defined in:
- lib/tableschema/constraints/enum.rb
Instance Method Summary collapse
Instance Method Details
#check_enum ⇒ Object
5 6 7 8 9 10 |
# File 'lib/tableschema/constraints/enum.rb', line 5 def check_enum if !parse_constraint(@constraints['enum']).include?(@value) raise TableSchema::ConstraintError.new("The value for the field `#{@field['name']}` must be in the enum array") end true end |