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



787
788
789
# File 'lib/active_record/migration.rb', line 787

def reverting
  @reverting
end

Instance Method Details

#downObject



792
793
794
# File 'lib/active_record/migration.rb', line 792

def down
  yield if reverting
end

#upObject



788
789
790
# File 'lib/active_record/migration.rb', line 788

def up
  yield unless reverting
end