Class: ReVIEW::OlistElementNode

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, num, content) ⇒ OlistElementNode

Returns a new instance of OlistElementNode.



1055
1056
1057
1058
1059
1060
# File 'lib/review/compiler.rb', line 1055

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

Instance Attribute Details

#compilerObject (readonly)

Returns the value of attribute compiler.



1061
1062
1063
# File 'lib/review/compiler.rb', line 1061

def compiler
  @compiler
end

#contentObject (readonly)

Returns the value of attribute content.



1064
1065
1066
# File 'lib/review/compiler.rb', line 1064

def content
  @content
end

#numObject

Returns the value of attribute num.



1063
1064
1065
# File 'lib/review/compiler.rb', line 1063

def num
  @num
end

#positionObject (readonly)

Returns the value of attribute position.



1062
1063
1064
# File 'lib/review/compiler.rb', line 1062

def position
  @position
end

Instance Method Details

#concat(elem) ⇒ Object



258
259
260
# File 'lib/review/node.rb', line 258

def concat(elem)
  @content << elem
end

#to_docObject



254
255
256
# File 'lib/review/node.rb', line 254

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