Sha256: 664a0df79f4e090ea4a73d0287ebb404ccb3ccc79fee43fcb1ad516398cc4ad7

Contents?: true

Size: 550 Bytes

Versions: 5

Compression:

Stored size: 550 Bytes

Contents

require "semaphore/sms/version"
require "semaphore/sms/client"

module Semaphore
  module Sms
    class ::ConfigurationError < StandardError; end

    class << self
      attr_writer :api_key, :sender_name

      def setup
        yield self
        true
      end

      def client
        @client ||= Semaphore::Sms::Client.new(self)
      end

      def api_key
        raise ConfigurationError, 'API Key is required for GET/POST' unless @api_key
        @api_key
      end

      def sender_name
        @sender_name
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
semaphore-sms-0.1.9 lib/semaphore/sms.rb
semaphore-sms-0.1.8 lib/semaphore/sms.rb
semaphore-sms-0.1.7 lib/semaphore/sms.rb
semaphore-sms-0.1.6 lib/semaphore/sms.rb
semaphore-sms-0.1.5 lib/semaphore/sms.rb