Class: Recursivar

Inherits:
Object show all
Defined in:
lib/recursivar.rb,
lib/recursivar/heap.rb,
lib/recursivar/graph.rb,
lib/recursivar/formats.rb,
lib/recursivar/version.rb,
lib/recursivar/tmp_file.rb

Defined Under Namespace

Modules: Formats Classes: Graph, Heap, TmpFile

Constant Summary collapse

VERSION =
"0.1.1"

Instance Method Summary collapse

Constructor Details

#initialize(stack, opt) ⇒ Recursivar

Returns a new instance of Recursivar.



15
16
17
18
19
20
21
# File 'lib/recursivar.rb', line 15

def initialize(stack, opt)
  heap = Heap.new(stack)
  @graph = Graph.new(heap)

  obj = stack.first.send(:binding_self)
  @out = TmpFile.new(obj)
end

Instance Method Details



23
24
25
# File 'lib/recursivar.rb', line 23

def print
  @out.puts @graph.to_s
end