Class: MongoMapper::Migration::MigrationDefinition

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

Instance Method Summary collapse

Instance Method Details

#downgrade(&block) ⇒ Object Also known as: down



12
13
14
15
16
17
18
# File 'lib/mongo_mapper_ext/migration.rb', line 12

def downgrade &block
  if block
    @downgrade = block
  else
    @downgrade
  end
end

#upgrade(&block) ⇒ Object Also known as: up



3
4
5
6
7
8
9
# File 'lib/mongo_mapper_ext/migration.rb', line 3

def upgrade &block
  if block
    @upgrade = block
  else
    @upgrade
  end
end