Sha256: da484548160e2fa08aa6dabafc13574cc8c06c0524887c067bbbe79196b49ccf

Contents?: true

Size: 334 Bytes

Versions: 6

Compression:

Stored size: 334 Bytes

Contents

module CopyleaksApi
  module Validators
    class LanguageValidator
      class << self
        # raise error if given language is not allowed
        def validate!(language)
          raise UnknownLanguageError, "#{language} is unknown" unless Language::ALLOWED.include?(language)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
plagiarism-checker-2.1.2 lib/copyleaks_api/validators/language_validator.rb
plagiarism-checker-2.1.1 lib/copyleaks_api/validators/language_validator.rb
plagiarism-checker-2.1.0 lib/copyleaks_api/validators/language_validator.rb
plagiarism-checker-2.0.0 lib/copyleaks_api/validators/language_validator.rb
plagiarism-checker-1.0.0 lib/copyleaks_api/validators/language_validator.rb
mkisilenko-test-0.1.0 lib/copyleaks_api/validators/language_validator.rb