Class: RubySpeech::SSML::Desc

Inherits:
Element
  • Object
show all
Includes:
XML::Language
Defined in:
lib/ruby_speech/ssml/desc.rb

Overview

The emphasis element requests that the contained text be spoken with emphasis (also referred to as prominence or stress). The synthesis processor determines how to render emphasis since the nature of emphasis differs between languages, dialects or even voices.

www.w3.org/TR/speech-synthesis/#S3.2.2

Constant Summary collapse

VALID_CHILD_TYPES =
[Nokogiri::XML::Text, String].freeze

Instance Attribute Summary

Attributes included from GenericElement

#parent

Instance Method Summary collapse

Methods included from XML::Language

#language, #language=

Methods inherited from Element

module, namespace, root_element, #to_doc

Methods included from GenericElement

#+, #==, #base_uri, #base_uri=, #build, #children, #clone, #create_node, #embed, #eval_dsl_block, included, #inherit, #initialize, #inspect, #mass_assign, #method_missing, #namespace=, #namespace_href, #node, #nokogiri_children, #read_attr, #respond_to_missing?, #string, #to_s, #traverse, #version, #version=, #write_attr

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RubySpeech::GenericElement

Instance Method Details

#<<(arg) ⇒ Object

Raises:



18
19
20
21
# File 'lib/ruby_speech/ssml/desc.rb', line 18

def <<(arg)
  raise InvalidChildError, "A Desc can only accept Strings as children" unless VALID_CHILD_TYPES.include? arg.class
  super
end

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/ruby_speech/ssml/desc.rb', line 23

def eql?(o)
  super o, :language
end