class ReVIEW::ComplexInlineElementNode

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 943
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 155
def to_doc
  #content_str = super
  @compiler.compile_inline(@symbol, @content)
end
to_json() click to toggle source
# File lib/review/node.rb, line 160
def to_json
  '{"ruleName":"' + self.class.to_s.sub(/ReVIEW::/,"").sub(/Node$/,"") + '",' +
    %Q|"symbol":"#{@symbol}",| +
    "\"offset\":#{position.pos},\"line\":#{position.line},\"column\":#{position.col}," +
    '"childNodes":[' + @content.map(&:to_json).join(",") + ']}'
end
to_raw() click to toggle source
Calls superclass method ReVIEW::Node#to_raw
# File lib/review/node.rb, line 150
def to_raw
  content_str = super
  "@<#{@symbol}>{#{content_str}}"
end