Class: Ovec::TextNode

Inherits:
Node
  • Object
show all
Defined in:
lib/ovec/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ TextNode

Returns a new instance of TextNode.



89
90
91
# File 'lib/ovec/nodes.rb', line 89

def initialize(text)
	@text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



101
102
103
# File 'lib/ovec/nodes.rb', line 101

def text
  @text
end

Instance Method Details

#lengthObject



93
94
95
# File 'lib/ovec/nodes.rb', line 93

def length
	text.length
end

#to_texObject



97
98
99
# File 'lib/ovec/nodes.rb', line 97

def to_tex
	text
end