Sha256: 2a93cf4b89696991fa3f1769eedf1e2370eeef67c952c4f6a2937a501f9654e9

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

module RubySpeech
  module SSML
    extend ActiveSupport::Autoload

    autoload :Break
    autoload :Element
    autoload :Emphasis
    autoload :Prosody
    autoload :SayAs
    autoload :Speak
    autoload :Voice

    InvalidChildError = Class.new StandardError

    def self.draw(&block)
      Nokogiri::XML::Document.new.tap do |doc|
        doc << Speak.new.tap do |speak|
          block_return = speak.instance_eval(&block) if block_given?
          speak << block_return if block_return.is_a?(String)
        end
      end.to_s
    end
  end # SSML
end # RubySpeech

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_speech-0.1.1 lib/ruby_speech/ssml.rb
ruby_speech-0.1.0 lib/ruby_speech/ssml.rb