Class: ReVIEW::RawNode

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, builder, position, content) ⇒ RawNode

Returns a new instance of RawNode.



1077
1078
1079
1080
1081
1082
# File 'lib/review/compiler.rb', line 1077

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

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



1084
1085
1086
# File 'lib/review/compiler.rb', line 1084

def builder
  @builder
end

#compilerObject (readonly)

Returns the value of attribute compiler.



1083
1084
1085
# File 'lib/review/compiler.rb', line 1083

def compiler
  @compiler
end

#contentObject (readonly)

Returns the value of attribute content.



1086
1087
1088
# File 'lib/review/compiler.rb', line 1086

def content
  @content
end

#positionObject (readonly)

Returns the value of attribute position.



1085
1086
1087
# File 'lib/review/compiler.rb', line 1085

def position
  @position
end

Instance Method Details

#to_docObject



203
204
205
# File 'lib/review/node.rb', line 203

def to_doc
  @compiler.compile_raw(@builder, @content.join(""))
end