Class: ActiveRecord::Migration::ReversibleBlockHelper

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_record/migration.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#revertingObject

Returns the value of attribute reverting

Returns:

  • (Object)

    the current value of reverting



878
879
880
# File 'lib/active_record/migration.rb', line 878

def reverting
  @reverting
end

Instance Method Details

#downObject



883
884
885
# File 'lib/active_record/migration.rb', line 883

def down
  yield if reverting
end

#upObject



879
880
881
# File 'lib/active_record/migration.rb', line 879

def up
  yield unless reverting
end