Sha256: 50d63b5a3adb1e56dc0ec41ee024d520060f210cfc47f36fe40b6308aadc29d5

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

require_relative 'adapters/base'
require_relative 'adapters/merriam_webster'
require_relative 'adapters/transparent'

module WordOfTheDay
  class Adapter
    extend Forwardable

    def_delegator :@adapter, :message, :message

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rodbot-0.4.4 lib/rodbot/plugins/word_of_the_day/lib/adapter.rb