Sha256: 63c581d469f0565390bcfa4b1ce0440d63f51b13ee52dae8f0030fa1aed3df51

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

module StatusCat
  module Checkers
    class Twilio < Base

      cattr_accessor :sid
      cattr_accessor :auth_token

      def initialize
        return if gem_missing?('twilio-ruby', defined?(::Twilio))

        @value = sid
        @status = fail_on_exception do
          twilio = ::Twilio::REST::Client.new(sid, auth_token)
          twilio.api.account.messages.total ? nil : 'fail'
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
status_cat-5.0.0 lib/status_cat/checkers/twilio.rb