Top Level Namespace

Constant Summary collapse

Lldb_init_path_subclass =
File.expand_path('~')+'/.lldbinit'
Lldb_init_path_temp_subclass =
File.expand_path('~')+'/.lldbinit_temp'
Lldb_source_path_subclass =
File.expand_path('~')+'/.subclass_lldb'
Lldb_file_path_subclass =
File.expand_path('~')+'/.subclass_lldb/subclass_lldb.py'
Commond_str_subclass =
'command script import '+Lldb_file_path_subclass

Instance Method Summary collapse

Instance Method Details

#remove_dir(path) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rubygems_plugin.rb', line 53

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



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/rubygems_plugin.rb', line 66

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

	File.delete(Lldb_init_path_subclass)
	File.rename Lldb_init_path_temp_subclass, Lldb_init_path_subclass
	File.chmod(0664,Lldb_init_path_subclass)
	
end