Class: DbAgile::Core::Schema::Migrate::AbstractScript
- Inherits:
-
Object
- Object
- DbAgile::Core::Schema::Migrate::AbstractScript
- Includes:
- Enumerable
- Defined in:
- lib/dbagile/core/schema/migrate/abstract_script.rb
Instance Attribute Summary collapse
-
#operations ⇒ Object
readonly
Operations in this abstract script.
Instance Method Summary collapse
-
#<<(*ops) ⇒ Object
Pushes operations in this abstract script.
-
#each(&block) ⇒ Object
Yields the block with each operation in turn.
-
#initialize ⇒ AbstractScript
constructor
Creates an abstract script instance.
Constructor Details
#initialize ⇒ AbstractScript
Creates an abstract script instance
12 13 14 |
# File 'lib/dbagile/core/schema/migrate/abstract_script.rb', line 12 def initialize @operations = [] end |
Instance Attribute Details
#operations ⇒ Object (readonly)
Operations in this abstract script
9 10 11 |
# File 'lib/dbagile/core/schema/migrate/abstract_script.rb', line 9 def operations @operations end |
Instance Method Details
#<<(*ops) ⇒ Object
Pushes operations in this abstract script
22 23 24 |
# File 'lib/dbagile/core/schema/migrate/abstract_script.rb', line 22 def <<(*ops) self.operations.push(*ops) end |
#each(&block) ⇒ Object
Yields the block with each operation in turn
17 18 19 |
# File 'lib/dbagile/core/schema/migrate/abstract_script.rb', line 17 def each(&block) operations.each(&block) end |