Class: AST

Inherits:
Object
  • Object
show all
Defined in:
lib/mediacloth/mediawikiast.rb

Overview

AST Node

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index = 0, length = 0) ⇒ AST

Returns a new instance of AST.



9
10
11
12
13
14
15
# File 'lib/mediacloth/mediawikiast.rb', line 9

def initialize(index = 0,length = 0)
    @children = []
    @parent = nil
    @contents = ""
    @index = index
    @length = length
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



5
6
7
# File 'lib/mediacloth/mediawikiast.rb', line 5

def children
  @children
end

#contentsObject

Returns the value of attribute contents.



3
4
5
# File 'lib/mediacloth/mediawikiast.rb', line 3

def contents
  @contents
end

#indexObject

Returns the value of attribute index.



6
7
8
# File 'lib/mediacloth/mediawikiast.rb', line 6

def index
  @index
end

#lengthObject

Returns the value of attribute length.



7
8
9
# File 'lib/mediacloth/mediawikiast.rb', line 7

def length
  @length
end

#parentObject

Returns the value of attribute parent.



4
5
6
# File 'lib/mediacloth/mediawikiast.rb', line 4

def parent
  @parent
end