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
242 def initialize
243   @actions = []
244 end

Public Instance methods

reverse(&block)
[show source]
    # File lib/sequel/extensions/migration.rb
246 def reverse(&block)
247   instance_exec(&block)
248   actions = @actions.reverse
249   # Allow calling private methods as the reversing methods are private
250   Proc.new{actions.each{|a| send(*a)}}
251 end