Module: Lipsiadmin::Generator::Commands::Destroy
- Includes:
- Base
- Defined in:
- lib/generator.rb
Overview
:nodoc:
Constant Summary
Constants included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#append(relative_destination, text, sentinel = nil) ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/generator.rb', line 82 def append(relative_destination, text, sentinel=nil) path = destination_path(relative_destination) logger.append relative_destination content = File.read(path) if content.include?(text) text = content.gsub(text+"\n", "") File.open(path, 'wb') {|f| f.write(text) } end end |