Class: Hanami::CLI::Commands::App::DB::Utils::Database::DumpResult Private

Inherits:
SystemCall::Result show all
Defined in:
lib/hanami/cli/commands/app/db/utils/database.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0

Instance Attribute Summary

Attributes inherited from SystemCall::Result

#err, #exit_code, #out

Instance Method Summary collapse

Methods inherited from SystemCall::Result

#successful?

Constructor Details

#initialize(result, post_process: -> sql { sql }) ⇒ DumpResult

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DumpResult.

Since:

  • 2.2.0



16
17
18
19
# File 'lib/hanami/cli/commands/app/db/utils/database.rb', line 16

def initialize(result, post_process: -> sql { sql })
  @post_process = post_process
  super(result)
end

Instance Method Details

#sqlObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0



21
22
23
# File 'lib/hanami/cli/commands/app/db/utils/database.rb', line 21

def sql
  @post_process.call(out)
end