Class: ReVIEW::DlistElementNode

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

Returns a new instance of DlistElementNode.



975
976
977
978
979
980
# File 'lib/review/compiler.rb', line 975

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

Instance Attribute Details

#compilerObject (readonly)

Returns the value of attribute compiler.



981
982
983
# File 'lib/review/compiler.rb', line 981

def compiler
  @compiler
end

#contentObject (readonly)

Returns the value of attribute content.



984
985
986
# File 'lib/review/compiler.rb', line 984

def content
  @content
end

#positionObject (readonly)

Returns the value of attribute position.



982
983
984
# File 'lib/review/compiler.rb', line 982

def position
  @position
end

#textObject (readonly)

Returns the value of attribute text.



983
984
985
# File 'lib/review/compiler.rb', line 983

def text
  @text
end

Instance Method Details

#to_docObject



270
271
272
# File 'lib/review/node.rb', line 270

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