Class: Tumblargh::Node::Base

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/tumblargh/node/base.rb

Direct Known Subclasses

BlockEnd, BlockStart, Literal, Root, Tag

Instance Method Summary collapse

Instance Method Details

#to_sObject



14
15
16
# File 'lib/tumblargh/node/base.rb', line 14

def to_s
  text_value
end

#to_treeObject



10
11
12
# File 'lib/tumblargh/node/base.rb', line 10

def to_tree
  [type, text_value]
end

#typeObject



6
7
8
# File 'lib/tumblargh/node/base.rb', line 6

def type
  @type ||= self.class.name.split('::').last.to_sym
end