Class: PerconaMigrations::Runners::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/percona_migrations/runners/base.rb

Direct Known Subclasses

Percona, Sql

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name, commands, options: {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/percona_migrations/runners/base.rb', line 8

def initialize(table_name, commands, options: {})
  @table_name = table_name
  @commands = commands
  @options = options
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/percona_migrations/runners/base.rb', line 4

def self.available?
  true
end

Instance Method Details

#log(msg) ⇒ Object



18
19
20
# File 'lib/percona_migrations/runners/base.rb', line 18

def log(msg)
  logger.info(msg) if logger
end

#loggerObject



22
23
24
# File 'lib/percona_migrations/runners/base.rb', line 22

def logger
  PerconaMigrations.logger
end

#runObject

Raises:

  • (NotImplementerError)


14
15
16
# File 'lib/percona_migrations/runners/base.rb', line 14

def run
  raise NotImplementerError
end