Class: ReVIEW::OlistNode

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

Returns a new instance of OlistNode.



1045
1046
1047
1048
1049
# File 'lib/review/compiler.rb', line 1045

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

Instance Attribute Details

#compilerObject (readonly)

Returns the value of attribute compiler.



1050
1051
1052
# File 'lib/review/compiler.rb', line 1050

def compiler
  @compiler
end

#contentObject (readonly)

Returns the value of attribute content.



1052
1053
1054
# File 'lib/review/compiler.rb', line 1052

def content
  @content
end

#positionObject (readonly)

Returns the value of attribute position.



1051
1052
1053
# File 'lib/review/compiler.rb', line 1051

def position
  @position
end

Instance Method Details

#to_docObject



244
245
246
# File 'lib/review/node.rb', line 244

def to_doc
  @compiler.compile_olist(@content)
end