Sha256: 392b9f1b2b55dce1da7c01b168a291eeaa003e86fededa18eaab9fb00420d2b0
Contents?: true
Size: 395 Bytes
Versions: 10
Compression:
Stored size: 395 Bytes
Contents
class DataloadMigration < ActiveRecord::Migration class << self attr_accessor :cols, :table_name, :b include FromHash end def self.new_migration(ops,&b) cls = Class.new(DataloadMigration) cls.from_hash(ops) cls.b = b cls.class_eval do def self.up instance_eval(&b) Dataload.log "Created table #{table_name}" end end cls end end
Version data entries
10 entries across 10 versions & 1 rubygems