module Fiona7 class Assert class << self def constraint(condition, message, code=418) raise Scrivito::ClientError.new(message, http_code: code) unless condition end def input(condition, message, code=422) raise Scrivito::ClientError.new(message, http_code: code) unless condition end def success(condition, message) raise Scrivito::ScrivitoError, message unless condition end def exists(condition, message) raise Scrivito::ResourceNotFound, message unless condition end end end end