Method: Id#save

Defined in:
lib/id.rb

#saveObject



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/id.rb', line 110

def save
  pathfile = File.open("../.idt-location", "w")
  @path.each {|node| pathfile.write node + "\n"}
  pathfile.write @node
  pathfile.close
  @nodes.each do |name, contents|
    next if name == "a"
    next if not name or name == ""
    next if Dir.exists? name.to_s
    file = File.open name.to_s, "w"
    contents.each do |line|
      file.write line + "\n"
    end
    file.close
  end
end