module LittleWeasel::Modules::DictionaryCacheValidatable
This module provides methods to validate a dictionary cache object. A dictionary cache object is a container that holds cached data related to one or more dictionaries. Dictionary
cache objects are normally specific to a DictionaryManager
object.
Public Class Methods
validate(dictionary_cache:)
click to toggle source
# File lib/LittleWeasel/modules/dictionary_cache_validatable.rb, line 10 def self.validate(dictionary_cache:) raise ArgumentError, "Argument dictionary_cache is not a valid Hash object: #{dictionary_cache.class}" \ unless dictionary_cache.is_a? Hash end
Public Instance Methods
validate_dictionary_cache(dictionary_cache:)
click to toggle source
# File lib/LittleWeasel/modules/dictionary_cache_validatable.rb, line 15 def validate_dictionary_cache(dictionary_cache:) DictionaryCacheValidatable.validate dictionary_cache: dictionary_cache end