module FakeFlorence::Announcers

Public Class Methods

load(config_array) click to toggle source
# File lib/fake_florence/announcers.rb, line 3
def self.load(config_array)
  config_array.map do |config|
    case config['type']
    when 'routemaster'
      require 'fake_florence/announcers/routemaster'
      Routemaster.new(config['url'], name: config['name'])
    else
      raise "Unsupported announcer: #{config}"
    end
  end
end