Top Level Namespace

Defined Under Namespace

Modules: OrgParse Classes: GraphViz

Instance Method Summary collapse

Instance Method Details

#disp_toc(node) ⇒ Object



49
50
51
52
53
54
55
56
# File 'bin/org-test', line 49

def disp_toc(node)
  node.children.each do |n|
    if n.kind == :SECTION
      puts n.section_no 
      disp_toc(n)
    end
  end
end

#update_test(node, opt = {}) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'bin/org-test', line 31

def update_test(node, opt = {})
  cnt = 1;

  section_no = node.section_no if node.kind == :SECTION
  node.children.each do |n|
    n.parent = node
    if n.kind == :SECTION
      if node.kind == :ROOT
        n.section_no = cnt.to_s
      else
        n.section_no = section_no + "." + cnt.to_s
      end
      cnt += 1
    end
    update_test n, opt
  end
end