Method: Magicfile#append_after_current

Defined in:
lib/magicfile.rb

#append_after_current(line, enable_move_down = true, spaces = 2) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/magicfile.rb', line 55

def append_after_current(line, enable_move_down=true, spaces=2)


  line.space_num = @current_line_space_num + spaces
  @lines.insert(@current_line_index + 1, line)


  if enable_move_down
    @current_line_space_num = line.space_num
    @current_line_index += 1
  end

end