15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/bem/actions.rb', line 15
def destroy_with(options = {})
BEM.configuration.technologies.each do |tech|
path = build_path_for(tech[:extension], options, tech[:group])
path_without_extension = path.split("#{ tech[:group] }/").last.sub(tech[:extension], '')
remove_file File.expand_path('..', path)
manifest_name = options[:manifest].present? ? options[:manifest] : 'application'
manifest = File.join(Rails.root, 'app', 'assets', tech[:group], manifest_name + tech[:extension])
path = options[:remove_from_manifest] ? manifest : level_path(options[:level], tech)
gsub_file(path, string_to_append(tech, path_without_extension), '') if File.exist? path
end
end
|