class Sequel::MigrationAlterTableReverser

  1. lib/sequel/extensions/migration.rb
Superclass: BasicObject

Handles reversing an alter_table block in a reversible migration.

Methods

Public Class

  1. new

Public Instance

  1. reverse

Public Class methods

new ()
[show source]
    # File lib/sequel/extensions/migration.rb
229 def initialize
230   @actions = []
231 end

Public Instance methods

reverse (&block)
[show source]
    # File lib/sequel/extensions/migration.rb
233 def reverse(&block)
234   instance_exec(&block)
235   actions = @actions.reverse
236   # Allow calling private methods as the reversing methods are private
237   Proc.new{actions.each{|a| send(*a)}}
238 end