Class: WordOfTheDay::Adapter

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rodbot/plugins/word_of_the_day/lib/adapter.rb,
lib/rodbot/plugins/word_of_the_day/lib/adapters/base.rb,
lib/rodbot/plugins/word_of_the_day/lib/adapters/transparent.rb,
lib/rodbot/plugins/word_of_the_day/lib/adapters/merriam_webster.rb

Defined Under Namespace

Classes: Base, MerriamWebster, Transparent

Instance Method Summary collapse

Constructor Details

#initialize(language) ⇒ Adapter

Returns a new instance of Adapter.



13
14
15
16
# File 'lib/rodbot/plugins/word_of_the_day/lib/adapter.rb', line 13

def initialize(language)
  @language = language
  @adapter = (language == 'English' ? MerriamWebster : Transparent).new(language)
end