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



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/ass_launcher/cmd.rb', line 264

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