Module: RubySpeech::SSML

Defined in:
lib/ruby_speech/ssml.rb,
lib/ruby_speech/ssml/p.rb,
lib/ruby_speech/ssml/s.rb,
lib/ruby_speech/ssml/sub.rb,
lib/ruby_speech/ssml/desc.rb,
lib/ruby_speech/ssml/mark.rb,
lib/ruby_speech/ssml/audio.rb,
lib/ruby_speech/ssml/break.rb,
lib/ruby_speech/ssml/speak.rb,
lib/ruby_speech/ssml/voice.rb,
lib/ruby_speech/ssml/say_as.rb,
lib/ruby_speech/ssml/element.rb,
lib/ruby_speech/ssml/phoneme.rb,
lib/ruby_speech/ssml/prosody.rb,
lib/ruby_speech/ssml/emphasis.rb

Defined Under Namespace

Classes: Audio, Break, Desc, Element, Emphasis, Mark, P, Phoneme, Prosody, S, SayAs, Speak, Sub, Voice

Constant Summary

InvalidChildError =
Class.new StandardError
SSML_NAMESPACE =
'http://www.w3.org/2001/10/synthesis'

Class Method Summary collapse

Class Method Details

.draw(*args, &block) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/ruby_speech/ssml.rb', line 24

def self.draw(*args, &block)
  document = Nokogiri::XML::Document.new
  Speak.new(document, *args).tap do |speak|
    document.root = speak.node
    block_return = speak.eval_dsl_block &block
    speak << block_return if block_return.is_a?(String)
  end
end

.import(other) ⇒ Object



33
34
35
# File 'lib/ruby_speech/ssml.rb', line 33

def self.import(other)
  Element.import other
end