Class: DbAgile::Core::Schema::Migrate::AbstractScript

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/dbagile/core/schema/migrate/abstract_script.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAbstractScript

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

#operationsObject (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