Sha256: 79680043a9fe33600bd9916a10afe3afa8d681f694613fb325442758316fd5f4

Contents?: true

Size: 892 Bytes

Versions: 14

Compression:

Stored size: 892 Bytes

Contents

module RubySpeech
  module SSML
    ##
    # A p element represents a paragraph.
    # The use of p elements is optional. Where text occurs without an enclosing p element the synthesis processor should attempt to determine the structure using language-specific knowledge of the format of plain text.
    #
    # http://www.w3.org/TR/speech-synthesis/#S3.1.7
    #
    class P < Element

      register :p

      VALID_CHILD_TYPES = [Nokogiri::XML::Element, Nokogiri::XML::Text, String, Audio, Break, Emphasis, Mark, Phoneme, Prosody, S, SayAs, Sub, Voice].freeze

      def <<(arg)
        raise InvalidChildError, "A P can only accept String, Audio, Break, Emphasis, Mark, Phoneme, Prosody, SayAs, Sub, S, Voice as children" unless VALID_CHILD_TYPES.include? arg.class
        super
      end

      def eql?(o)
        super o, :language
      end
    end # P
  end # SSML
end # RubySpeech

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_speech-2.1.2-java lib/ruby_speech/ssml/p.rb
ruby_speech-2.1.2 lib/ruby_speech/ssml/p.rb
ruby_speech-2.1.1-java lib/ruby_speech/ssml/p.rb
ruby_speech-2.1.1 lib/ruby_speech/ssml/p.rb
ruby_speech-2.1.0-java lib/ruby_speech/ssml/p.rb
ruby_speech-2.1.0 lib/ruby_speech/ssml/p.rb
ruby_speech-2.0.2 lib/ruby_speech/ssml/p.rb
ruby_speech-2.0.1 lib/ruby_speech/ssml/p.rb
ruby_speech-1.1.0 lib/ruby_speech/ssml/p.rb
ruby_speech-1.0.2 lib/ruby_speech/ssml/p.rb
ruby_speech-1.0.1 lib/ruby_speech/ssml/p.rb
ruby_speech-1.0.0 lib/ruby_speech/ssml/p.rb
ruby_speech-0.5.1 lib/ruby_speech/ssml/p.rb
ruby_speech-0.5.0 lib/ruby_speech/ssml/p.rb