Class: Glyph::TextNode

Inherits:
SyntaxNode show all
Defined in:
lib/glyph/syntax_node.rb

Overview

A piece of text in Glyph Abstract Syntax Tree

Since:

  • 0.3.0

Instance Attribute Summary

Attributes inherited from Node

#children, #parent

Instance Method Summary collapse

Methods inherited from SyntaxNode

#evaluate, #inspect, #parent_macro

Methods inherited from Node

#&, #<<, #==, #>>, #ascend, #child, #clear, #descend, #each_child, #find_child, #find_parent, #from, #initialize, #inspect, #root, #to_hash, #to_node

Methods inherited from Hash

#to_node, #to_options

Constructor Details

This class inherits a constructor from Node

Instance Method Details

#to_sString

Returns the text itself.

Returns:

  • (String)

    the text itself

Since:

  • 0.3.0


171
172
173
# File 'lib/glyph/syntax_node.rb', line 171

def to_s
	self[:value]
end