class ReVIEW::InlineElementNode
Attributes
compiler[R]
content[R]
position[R]
symbol[R]
Public Class Methods
new(compiler, position, symbol, content)
click to toggle source
# File lib/review/compiler.rb, line 1013 def initialize(compiler, position, symbol, content) @compiler = compiler @position = position @symbol = symbol @content = content end
Public Instance Methods
to_doc()
click to toggle source
# File lib/review/node.rb, line 136 def to_doc #content_str = super @compiler.compile_inline(@symbol, @content) end
to_json()
click to toggle source
# File lib/review/node.rb, line 141 def to_json '{"ruleName":"' + self.class.to_s.sub(/ReVIEW::/,"").sub(/Node$/,"") + '",' + %Q|"symbol":"#{@symbol}",| + "\"offset\":#{position.pos},\"line\":#{position.line},\"column\":#{position.col}," + (@concat ? '"childNodes":[' + @content.map(&:to_json).join(",") + ']' : '"childNodes":[]') + '}' end
to_raw()
click to toggle source
Calls superclass method
ReVIEW::Node#to_raw
# File lib/review/node.rb, line 131 def to_raw content_str = super "@<#{@symbol}>{#{content_str}}" end