Method: RubySpeech::SSML.draw

Defined in:
lib/ruby_speech/ssml.rb

.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