IgorShkidchenko/rg_codebreaker

View on GitHub
lib/app/entities/validatable_entity.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Codebreaker
  class ValidatableEntity
    include Validator

    def initialize
      @errors = []
    end

    def validate
      raise NotImplementedError
    end

    def valid?
      validate
      @errors.empty?
    end
  end
end