app/models/effective/code_writer.rb in effective_developer-0.2.7 vs app/models/effective/code_writer.rb in effective_developer-0.2.8
- old
+ new
@@ -203,9 +203,14 @@
def gsub!(source, target)
lines.each { |line| @changed = true if line.gsub!(source, target) }
end
+ def replace(index, content)
+ @changed = true
+ lines[index].replace(content.to_s)
+ end
+
private
def write!
return false unless changed?