Class: Plivo::Speak

Inherits:
Element show all
Defined in:
lib/plivo.rb

Instance Attribute Summary

Attributes inherited from Element

#name, #node

Instance Method Summary collapse

Methods inherited from Element

#add, #convert_value, #method_missing, #to_s, #to_xml

Constructor Details

#initialize(body, attributes = {}) ⇒ Speak

Returns a new instance of Speak


636
637
638
639
640
641
642
643
# File 'lib/plivo.rb', line 636

def initialize(body, attributes={})
    if not body
        raise PlivoError, 'No text set for Speak'
    else
        body = HTMLEntities.new(:html4).encode(body, :decimal)
    end
    super(body, attributes)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Plivo::Element