Class: Plivo::XML::Sub
Constant Summary
Constants inherited from Element
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(body, attributes = {}) ⇒ Sub
constructor
A new instance of Sub.
Methods inherited from Element
#add, #add_attribute, #convert_value, #hyphenate, #method_missing, #to_s, #to_xml
Constructor Details
#initialize(body, attributes = {}) ⇒ Sub
Returns a new instance of Sub.
7 8 9 10 11 12 13 |
# File 'lib/plivo/xml/sub.rb', line 7 def initialize(body, attributes = {}) raise PlivoXMLError, 'No text set for sub element' unless body unless attributes && attributes[:alias] raise PlivoXMLError, 'alias is a required attribute for sub element' end super(body, attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Plivo::XML::Element