Method: Mongo::Migration#add
- Defined in:
- lib/mongo/migration/migration.rb
#add(version, &block) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/mongo/migration/migration.rb', line 6 def add version, &block raise "version should be an Integer! (but you provided '#{version}' instad)!" unless version.is_a? Integer definition = Definition.new block.call definition definitions[version] = definition end |