module Voicepartner

Constants

VERSION

Attributes

client[RW]
configuration[RW]

Public Class Methods

configure() { |configurator| ... } click to toggle source
# File lib/voicepartner.rb, line 8
def configure
  raise 'You need to provide a block to configure' unless block_given?

  configurator = Configurator.new
  yield configurator
  self.configuration = configurator.config
  self.client = Client.new(self.configuration)
end
send_vocal_message(to:, message_text:) click to toggle source
# File lib/voicepartner.rb, line 21
def send_vocal_message(to:, message_text:)
  if client.nil?
    raise 'Initialization Error: ' \
    'You must call Voicepartner.configure before calling send_vocal_message'
  end

  client.send_vocal_message(to: to, message_text: message_text)
end