module LittleWeasel::Modules::WordResultsValidatable

This module provides methods to validate a word results

Public Instance Methods

vaidate_word_valid() click to toggle source
# File lib/LittleWeasel/modules/word_results_validatable.rb, line 22
def vaidate_word_valid
  raise ArgumentError, "Argument word_valid is not true or false: #{word_cached.class}" \
    unless [true, false].include? word_valid
end
validate_filters_matched() click to toggle source
# File lib/LittleWeasel/modules/word_results_validatable.rb, line 12
def validate_filters_matched
  raise ArgumentError, "Argument filters_matched is not an Array: #{filters_matched.class}" \
    unless filters_matched.is_a? Array
end
validate_original_word() click to toggle source
# File lib/LittleWeasel/modules/word_results_validatable.rb, line 7
def validate_original_word
  raise ArgumentError, "Argument original_word is not a String: #{original_word.class}" \
    unless original_word.is_a? String
end
validate_word_cached() click to toggle source
# File lib/LittleWeasel/modules/word_results_validatable.rb, line 17
def validate_word_cached
  raise ArgumentError, "Argument word_cached is not true or false: #{word_cached.class}" \
    unless [true, false].include? word_cached
end