diff --git a/src/ameba/source/corrector.cr b/src/ameba/source/corrector.cr index fbb50f8a..f4adf1da 100644 --- a/src/ameba/source/corrector.cr +++ b/src/ameba/source/corrector.cr @@ -21,6 +21,14 @@ class Ameba::Source @rewriter.remove(loc_to_pos(location), loc_to_pos(end_location) + 1) end + def insert_before(location, end_location, content) + @rewriter.insert_before(loc_to_pos(location), loc_to_pos(end_location) + 1, content) + end + + def insert_after(location, end_location, content) + @rewriter.insert_after(loc_to_pos(location), loc_to_pos(end_location) + 1, content) + end + def insert_before(location, content) @rewriter.insert_before(loc_to_pos(location), content) end