Class: Plivo::XML::W
Constant Summary collapse
- VALID_ROLE_ATTRIBUTE_VALUES =
%w(amazon:VB amazon:VBD amazon:SENSE_1)
Constants inherited from Element
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(body, attributes = {}) ⇒ W
constructor
A new instance of W.
Methods inherited from Element
#add, #add_attribute, #convert_value, #hyphenate, #method_missing, #to_s, #to_xml
Constructor Details
#initialize(body, attributes = {}) ⇒ W
Returns a new instance of W.
9 10 11 12 13 14 |
# File 'lib/plivo/xml/w.rb', line 9 def initialize(body, attributes = {}) if attributes && attributes[:role] && !VALID_ROLE_ATTRIBUTE_VALUES.include?(attributes[:role]) raise PlivoXMLError, "invalid attribute value #{attributes[:role]} for role" end super(body, attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Plivo::XML::Element