Class: DataloadMigration
- Extended by:
- FromHash
- Defined in:
- lib/dataload/migration.rb
Class Attribute Summary collapse
-
.b ⇒ Object
Returns the value of attribute b.
-
.cols ⇒ Object
Returns the value of attribute cols.
-
.table_name ⇒ Object
Returns the value of attribute table_name.
Class Method Summary collapse
Class Attribute Details
.b ⇒ Object
Returns the value of attribute b.
3 4 5 |
# File 'lib/dataload/migration.rb', line 3 def b @b end |
.cols ⇒ Object
Returns the value of attribute cols.
3 4 5 |
# File 'lib/dataload/migration.rb', line 3 def cols @cols end |
.table_name ⇒ Object
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/dataload/migration.rb', line 3 def table_name @table_name end |
Class Method Details
.new_migration(ops, &b) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dataload/migration.rb', line 6 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 |