Sha256: 023ed61ba2aa0ea631922866ad0439ed96db0b7028675e076b70ed43a8274ed0

Contents?: true

Size: 607 Bytes

Versions: 8

Compression:

Stored size: 607 Bytes

Contents

require 'ruby_speech/generic_element'

module RubySpeech
  module SSML
    class Element
      def self.namespace
        SSML_NAMESPACE
      end

      def self.root_element
        Speak
      end

      def self.module
        SSML
      end

      include GenericElement

      def to_doc
        document
      end

      private

      def set_time_attribute(key, value)
        raise ArgumentError, "You must specify a valid #{key} (positive float value in seconds)" unless value.is_a?(Numeric) && value >= 0
        self[key] = "#{value}s"
      end
    end # Element
  end # SSML
end # RubySpeech

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_speech-2.3.2-java lib/ruby_speech/ssml/element.rb
ruby_speech-2.3.2 lib/ruby_speech/ssml/element.rb
ruby_speech-2.3.1-java lib/ruby_speech/ssml/element.rb
ruby_speech-2.3.1 lib/ruby_speech/ssml/element.rb
ruby_speech-2.3.0-java lib/ruby_speech/ssml/element.rb
ruby_speech-2.3.0 lib/ruby_speech/ssml/element.rb
ruby_speech-2.2.2-java lib/ruby_speech/ssml/element.rb
ruby_speech-2.2.2 lib/ruby_speech/ssml/element.rb