Class: Mongo::Migration::Definition

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

Instance Method Summary collapse

Instance Method Details

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



11
12
13
14
15
16
17
# File 'lib/mongo/migration/definition.rb', line 11

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

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



2
3
4
5
6
7
8
# File 'lib/mongo/migration/definition.rb', line 2

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