Sha256: eabb1f105663f2d04d91f514d6d209020bb392709564e4ac7974818801e8a076
Contents?: true
Size: 470 Bytes
Versions: 1
Compression:
Stored size: 470 Bytes
Contents
module Sifterology module ErrorTranslator extend self def translate_to_exception(sifter_message) case sifter_message when /Secure Connection Required/i return SSLRequired.new(sifter_message) when /Invalid Token/i return InvalidToken.new(sifter_message) when /Invalid Account/i return InvalidAccount.new(sifter_message) end SifterError.new(sifter_message) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sifterology-0.1.1 | lib/sifterology/error_translator.rb |