Class: Highscore::Whitelist

Inherits:
Wordlist show all
Defined in:
lib/highscore/whitelist.rb

Overview

whitelisted words

Instance Attribute Summary

Attributes inherited from Wordlist

#words

Instance Method Summary collapse

Methods inherited from Wordlist

#<<, #each, #include?, #initialize, #length, load, load_file, #to_a

Constructor Details

This class inherits a constructor from Highscore::Wordlist

Instance Method Details

#filter(keywords) ⇒ Object

filters a given keywords array

Parameters:

  • Array

    keywords

Returns:

  • Array



12
13
14
15
16
# File 'lib/highscore/whitelist.rb', line 12

def filter(keywords)
  keywords.delete_if do |key, value|
    not include?(key.downcase)
  end
end