lib/punchblock/component/output.rb in punchblock-2.6.0 vs lib/punchblock/component/output.rb in punchblock-2.7.0
- old
+ new
@@ -44,23 +44,31 @@
def rayo_children(root)
root.cdata xml_value
super
end
+ def size
+ if ssml?
+ value.children.count
+ else
+ value.size
+ end
+ end
+
+ def ssml?
+ content_type == SSML_CONTENT_TYPE
+ end
+
private
def xml_value
if ssml?
value.to_s
elsif urilist?
value.to_s
elsif
value
end
- end
-
- def ssml?
- content_type == SSML_CONTENT_TYPE
end
def urilist?
content_type == 'text/uri-list'
end