class Textbringer::CompositeAction

Public Class Methods

new(buffer, location) click to toggle source
Calls superclass method Textbringer::UndoableAction::new
# File lib/textbringer/buffer.rb, line 1727
def initialize(buffer, location)
  super(buffer, location)
  @actions = []
end

Public Instance Methods

add_action(action) click to toggle source
# File lib/textbringer/buffer.rb, line 1732
def add_action(action)
  @actions.push(action)
end
redo() click to toggle source
# File lib/textbringer/buffer.rb, line 1742
def redo
  @actions.each do |action|
    action.redo
  end
end
undo() click to toggle source
# File lib/textbringer/buffer.rb, line 1736
def undo
  @actions.reverse_each do |action|
    action.undo
  end
end