25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/id.rb', line 25
def initialize_id
@references = ["<", "%"]
@promptnode = nil
@default_prompt = "<> ".style("blue", "black")
@prompt = @default_prompt
@Root = "nodes"
@raw = false
@msg = ""
@Home = ENV["HOME"] + "/"
@Dir = @Home + ".nodes/"
@included_nodes = []
Dir.mkdir @Dir if not Dir.exists? @Dir
Dir.chdir @Dir
system("touch ../.idt-location")
unless File.open("../.idt-location").readlines()[0] == @Root + "\n"
system("echo #{@Root} > ../.idt-location")
end
@nodes = {}
@path = []
load
end
|