class Wunderbar::ScriptNode
Attributes
binding[RW]
block[RW]
Public Instance Methods
post()
click to toggle source
# File lib/wunderbar/node.rb, line 351 def post; "//]]>"; end
pre()
click to toggle source
# File lib/wunderbar/node.rb, line 350 def pre; "//<![CDATA["; end
serialize(options, result, indent)
click to toggle source
Calls superclass method
Wunderbar::CDATANode#serialize
# File lib/wunderbar/script.rb, line 11 def serialize(options, result, indent) @block ||= nil if @block and @children.empty? and not @text width = options[:width] width -= indent.to_s.length if width opts = {binding: @binding, width: width} opts = {**@attrs.delete(:options), **opts} if @attrs[:options] @text = Ruby2JS.convert(@block, opts).to_s end super end