123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Migration::ReversibleBlockHelper

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Struct
Instance Chain:
self, ::Struct
Inherits: Struct
Defined in: activerecord/lib/active_record/migration.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#reverting (rw)

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration.rb', line 873

ReversibleBlockHelper = Struct.new(:reverting)

Instance Method Details

#down

[ GitHub ]

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

def down
  yield if reverting
end

#up

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration.rb', line 874

def up
  yield unless reverting
end