Module: Commands

Included in:
DBFork, DatabaseFork
Defined in:
lib/database_fork/commands.rb

Instance Method Summary collapse

Instance Method Details

#execute_commandsObject



6
7
8
9
10
11
12
# File 'lib/database_fork/commands.rb', line 6

def execute_commands
  @commands.each do |command, message|
    log_info message
    log_debug command
    `#{command}`
  end
end

#record_command(command, message) ⇒ Object



2
3
4
# File 'lib/database_fork/commands.rb', line 2

def record_command(command, message)
  @commands << [command, message]
end

#reset_commands!Object



14
15
16
# File 'lib/database_fork/commands.rb', line 14

def reset_commands!
  @commands = []
end