Method: Id#load

Defined in:
lib/id.rb

#loadObject



127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/id.rb', line 127

def load
  `ls -a`.split("\n").each do |name|
    next if Dir.exists? name
    @nodes[name] = File.open(name).readlines
    @nodes[name].collect! {|line| line.rstrip}
  end
  system("touch ../.idt-location")
  pathfile = File.open("../.idt-location")
  location = pathfile.readlines.collect{|node| node.rstrip}
  puts location.to_s
  @path = location[0..-2]
  @node = location[-1]
end