Class: Brut::CLI::Apps::DB::Migrate::MessagingProxyLogger

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/brut/cli/apps/db.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger, command) ⇒ MessagingProxyLogger

Returns a new instance of MessagingProxyLogger.



216
217
218
219
# File 'lib/brut/cli/apps/db.rb', line 216

def initialize(logger, command)
  super(logger)
  @command = command
end

Instance Method Details

#info(msg) ⇒ Object



220
221
222
223
224
225
# File 'lib/brut/cli/apps/db.rb', line 220

def info(msg)
  if msg =~ /Finished applying migration (.*).rb/
    @command.send(:puts,"Applied migration #{@command.send(:theme).code.render($1)}")
  end
  __getobj__.info(msg)
end