Class: DataMigrations::Instruction::Base
- Inherits:
-
Object
- Object
- DataMigrations::Instruction::Base
- Defined in:
- lib/data_migrations/instruction/base.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#migration ⇒ Object
readonly
Returns the value of attribute migration.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(migration) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(migration) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/data_migrations/instruction/base.rb', line 11 def initialize(migration) @migration = migration end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
4 5 6 |
# File 'lib/data_migrations/instruction/base.rb', line 4 def columns @columns end |
#migration ⇒ Object (readonly)
Returns the value of attribute migration.
9 10 11 |
# File 'lib/data_migrations/instruction/base.rb', line 9 def migration @migration end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/data_migrations/instruction/base.rb', line 4 def @options end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 |
# File 'lib/data_migrations/instruction/base.rb', line 21 def execute statements.each do |statement| puts "Executing: #{statement}" connection.execute(statement) end end |