Class: Punchblock::Component::Input::Grammar

Inherits:
RayoNode show all
Defined in:
lib/punchblock/component/input.rb

Constant Summary

GRXML_CONTENT_TYPE =
'application/srgs+xml'

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #connection, #original_component

Instance Method Summary collapse

Methods inherited from RayoNode

#==, class_from_registration, from_xml, #inspect, register, #source, #to_rayo, #to_xml

Instance Method Details

#inherit(xml_node) ⇒ Object



88
89
90
91
# File 'lib/punchblock/component/input.rb', line 88

def inherit(xml_node)
  self.value = xml_node.content.strip
  super
end

#rayo_attributesObject



93
94
95
96
97
98
# File 'lib/punchblock/component/input.rb', line 93

def rayo_attributes
  {
    'url' => url,
    'content-type' => content_type
  }
end

#rayo_children(root) ⇒ Object



100
101
102
# File 'lib/punchblock/component/input.rb', line 100

def rayo_children(root)
  root.cdata value if value
end