Sha256: fa4f3d9b9fa8212a177e3e61165d0c9db2a6c27e131bfbcf2c65003fbfc5ead1
Contents?: true
Size: 322 Bytes
Versions: 6
Compression:
Stored size: 322 Bytes
Contents
module NubeFact::Validator def validate! #ToDO change for a real validator like ActiveModel::Validations or Hanami::Validations self.class::REQUIRED_FIELDS.each do |field| if send(field).nil? raise NubeFact::ValidationError.new "#{field} it's a required field." end end true end end
Version data entries
6 entries across 6 versions & 1 rubygems