Method: Glyph::SyntaxNode#inspect
- Defined in:
- lib/glyph/syntax_node.rb
permalink #inspect ⇒ String
Returns a textual representation of self.
18 19 20 21 22 23 24 25 26 |
# File 'lib/glyph/syntax_node.rb', line 18 def inspect string = "" descend do |e, level| # Remove document key to avoid endless resursion hash = e.to_hash.reject{|k,v| k == :document} string << " "*level+"(#{e.class})"+hash.inspect+"\n" end string.chomp end |