Method: XMigra::Migration#initialize
- Defined in:
- lib/xmigra/migration.rb
#initialize(info) ⇒ Migration
Returns a new instance of Migration.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/xmigra/migration.rb', line 11 def initialize(info) @id = info['id'].dup.freeze _follows = info[FOLLOWS] @follows = (_follows.dup.freeze unless _follows == EMPTY_DB) @sql = info.has_key?('sql') ? info["sql"].dup.freeze : nil @description = info["description"].dup.freeze @changes = (info[CHANGES] || []).dup.freeze @changes.each {|c| c.freeze} @all_info = Marshal.load(Marshal.dump(info)) end |