class ReVIEW::BlockElementNode
Attributes
args[R]
compiler[R]
content[R]
name[R]
position[R]
Public Class Methods
new(compiler, position, name, args, content)
click to toggle source
# File lib/review/compiler.rb, line 879 def initialize(compiler, position, name, args, content) @compiler = compiler @position = position @name = name @args = args @content = content end
Public Instance Methods
parse_args(*patterns)
click to toggle source
# File lib/review/node.rb, line 90 def parse_args(*patterns) patterns.map.with_index do |pattern, i| if @args[i] @args[i].__send__("to_#{pattern}") else nil end end end
to_doc()
click to toggle source
# File lib/review/node.rb, line 79 def to_doc # content_str = super args = @args.map(&:to_doc) if @content content_lines = @content.map(&:to_doc) else content_lines = nil end @compiler.compile_command(@name, @args, content_lines, self) end