Module: AssLauncher::Cmd::Abstract::Option::Dbms Private

Included in:
Main::SubCommands::MakeIb
Defined in:
lib/ass_launcher/cmd.rb

Overview

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

Mixin Command option

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

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.

rubocop:disable all



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/ass_launcher/cmd.rb', line 282

def self.included(base)
  dbtypes = AssLauncher::Support::ConnectionString::DBMS_VALUES\
    + ['File']

  define_method :valid_db_types do
    dbtypes
  end

  base.option '--dbms', 'DB_TYPE',
              "db type: #{dbtypes}.\nValue \"File\""\
              ' for make file infobase', default: 'File' do |s|
    raise ArgumentError,
      "valid values: [#{valid_db_types.join(' ')}]" unless\
      valid_db_types.include? s
    s
  end
end