Sha256: 67de2fadb6ce456d692c0909abc2e819b4a06d2767252b51787a858006f6426d
Contents?: true
Size: 325 Bytes
Versions: 5
Compression:
Stored size: 325 Bytes
Contents
class SmsProvider def self.create(provider, settings) begin require "yopass/sms_provider/#{provider.downcase}" rescue LoadError => e raise "Unsupported provider #{provider}: #{e}" end class_name = provider.split("_").map {|v| v.capitalize }.join const_get(class_name).new settings end end
Version data entries
5 entries across 5 versions & 1 rubygems