Class: ReVIEW::UlistElementNode

Inherits:
Node show all
Defined in:
lib/review/node.rb,
lib/review/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#inspect, #to_json, #to_raw, #to_s_by

Constructor Details

#initialize(compiler, position, level, content) ⇒ UlistElementNode

Returns a new instance of UlistElementNode.



1129
1130
1131
1132
1133
1134
# File 'lib/review/compiler.rb', line 1129

def initialize(compiler, position, level, content)
  @compiler = compiler
  @position = position
  @level = level
  @content = content
end

Instance Attribute Details

#compilerObject (readonly)

Returns the value of attribute compiler.



1135
1136
1137
# File 'lib/review/compiler.rb', line 1135

def compiler
  @compiler
end

#contentObject (readonly)

Returns the value of attribute content.



1138
1139
1140
# File 'lib/review/compiler.rb', line 1138

def content
  @content
end

#levelObject

Returns the value of attribute level.



1137
1138
1139
# File 'lib/review/compiler.rb', line 1137

def level
  @level
end

#positionObject (readonly)

Returns the value of attribute position.



1136
1137
1138
# File 'lib/review/compiler.rb', line 1136

def position
  @position
end

Instance Method Details

#concat(elem) ⇒ Object



238
239
240
# File 'lib/review/node.rb', line 238

def concat(elem)
  @content << elem
end

#to_docObject



234
235
236
# File 'lib/review/node.rb', line 234

def to_doc
  @content.map(&:to_doc).join("")
end