Sha256: f05eef03040513979b3c97b5c0dc648173473754d4623ef4b979c2bc4cfbde32

Contents?: true

Size: 474 Bytes

Versions: 14

Compression:

Stored size: 474 Bytes

Contents

# frozen_string_literal: true

require_relative '../dictionary_key'

module LittleWeasel
  module Modules
    # Provides methods to validate a dictionary key object.
    module DictionaryKeyValidatable
      module_function

      def validate_dictionary_key(dictionary_key:)
        raise ArgumentError, "Argument dictionary_key is not a valid DictionaryKey object: #{dictionary_key.class}" \
          unless dictionary_key.is_a? DictionaryKey
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
LittleWeasel-5.0.13 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.12 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.11 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.10 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.9 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.8 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.7 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.6 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.5 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.4 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.3 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.2 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.1 lib/LittleWeasel/modules/dictionary_key_validatable.rb
LittleWeasel-5.0.0 lib/LittleWeasel/modules/dictionary_key_validatable.rb