Commit 66444cd3 authored by Alex Kalderimis's avatar Alex Kalderimis

Let `move_between` take arguments in either order

parent 3baaeb75
......@@ -565,6 +565,7 @@ module RelativePositioning
def move_between(before, after)
mover = Mover.new(START_POSITION, (MIN_POSITION..MAX_POSITION))
before, after = [before, after].sort_by(&:relative_position) if before && after
mover.move(self, before, after)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment