Class: RubySpeech::SSML::Speak

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

Overview

The Speech Synthesis Markup Language is an XML application. The root element is speak.

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

Constant Summary collapse

VALID_CHILD_TYPES =
[Nokogiri::XML::Element, Nokogiri::XML::Text, String, Audio, Break, Emphasis, Mark, P, Phoneme, Prosody, S, SayAs, Sub, Voice].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:


35
36
37
38
# File 'lib/ruby_speech/ssml/speak.rb', line 35

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

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)

40
41
42
# File 'lib/ruby_speech/ssml/speak.rb', line 40

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