Top Level Namespace

Constant Summary collapse

Lldb_init_path =
File.expand_path('~')+'/.lldbinit'
Lldb_init_path_temp =
File.expand_path('~')+'/.lldbinit_temp'
Lldb_source_path =
File.expand_path('~')+'/.subclass_lldb'
Lldb_file_path =
File.expand_path('~')+'/.subclass_lldb/subclass_lldb.py'
Commond_str =
'command script import '+Lldb_file_path

Instance Method Summary collapse

Instance Method Details

#remove_dir(path) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rubygems_plugin.rb', line 49

def remove_dir(path)
	if File.directory?(path)
		Dir.foreach(path) do |file|
		  if ((file.to_s != ".") and (file.to_s != ".."))
		    remove_dir("#{path}/#{file}")
		  end
		end
		Dir.delete(path)
	else
		File.delete(path)
	end
end

#remove_fileObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/rubygems_plugin.rb', line 62

def remove_file()
	f_temp = File.new(Lldb_init_path_temp,"w")
	f = File.new(Lldb_init_path, 'r')
	f.each do |line|
		if !line.chomp.include?Commond_str
			f_temp.puts line
		end
	end
	f.close
	f_temp.close

	File.delete(Lldb_init_path)
	File.rename Lldb_init_path_temp, Lldb_init_path
	File.chmod(0664,Lldb_init_path)
	
end