Sha256: f2941bed5107769a6c34bfb581f74b8febf014d241dcb52cb81244ebc18f45dd
Contents?: true
Size: 345 Bytes
Versions: 7
Compression:
Stored size: 345 Bytes
Contents
module ApacheAge module VertexTypeValidator def vertex_attribute(attribute_name, type_symbol, klass) attribute attribute_name, type_symbol validate do value = send(attribute_name) unless value.is_a?(klass) errors.add(attribute_name, "must be a #{klass.name}") end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems