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) ⇒ Base

Returns a new instance of Base.



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

def initialize(table_name, commands)
  @table_name = table_name
  @commands = commands
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



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

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

#loggerObject



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

def logger
  PerconaMigrations.logger
end

#runObject

Raises:

  • (NotImplementerError)


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

def run
  raise NotImplementerError
end