Module: Howdy::Dictionary
- Defined in:
- lib/howdy/base.rb,
lib/howdy/dictionaries/dict_pl.rb,
lib/howdy/dictionaries/ling_pl.rb,
lib/howdy/dictionaries/dictionary_com.rb,
lib/howdy/dictionaries/urban_dictionary_com.rb
Overview
Howdy::Dictionary exposes accessors of dictionaries collection.
Defined Under Namespace
Classes: Base, DictPl, DictionaryCom, LingPl, UrbanDictionaryCom
Class Method Summary collapse
-
.available ⇒ Object
Returns array of available dictionaries.
-
.current ⇒ Object
Returns current dictionary class.
-
.default ⇒ Object
Returns default dictionary.
-
.set(dictionary) ⇒ Object
Set current dictionary.
Class Method Details
.available ⇒ Object
Returns array of available dictionaries
30 31 32 |
# File 'lib/howdy/base.rb', line 30 def self.available @@available_dictionaries ||= [] end |
.current ⇒ Object
Returns current dictionary class
14 15 16 |
# File 'lib/howdy/base.rb', line 14 def self.current @@dictionary ||= default end |
.default ⇒ Object
Returns default dictionary
25 26 27 |
# File 'lib/howdy/base.rb', line 25 def self.default DictionaryCom end |
.set(dictionary) ⇒ Object
Set current dictionary. Pass a class as an argument
Howdy::Dictionary.set(DictionaryCom)
20 21 22 |
# File 'lib/howdy/base.rb', line 20 def self.set(dictionary) @@dictionary = dictionary end |