Module: Acapela

Defined in:
lib/acapela.rb,
lib/acapela/error.rb,
lib/acapela/voice.rb,
lib/acapela/config.rb,
lib/acapela/response.rb,
lib/acapela/constants.rb,
lib/acapela/voice_service.rb,
lib/acapela/mocks/response.rb,
lib/acapela/voices/default.rb,
lib/acapela/mocks/constants.rb,
lib/acapela/mocks/voice_service.rb

Defined Under Namespace

Modules: Mocks, Scripts, Voices Classes: Config, Error, Response, ServiceError, Voice, VoiceService

Constant Summary collapse

VERSION =
"0.8.1"

Class Method Summary collapse

Class Method Details

.configObject



15
16
17
# File 'lib/acapela.rb', line 15

def self.config
  @@config ||= Acapela::Config.read rescue nil
end

.config=(config) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/acapela.rb', line 19

def self.config=(config)
  if config.is_a?(Acapela::Config)
    @@config = config
  else
    raise Error.new("Acapela configuration required. Not #{config.class}")
  end
end