Class: Avmtrf1::Tools::Runner::Oracle

Inherits:
EacRubyUtils::Console::DocoptRunner
  • Object
show all
Includes:
EacRubyUtils::Console::Speaker
Defined in:
lib/avmtrf1/tools/runner/oracle.rb,
lib/avmtrf1/tools/runner/oracle/source_get.rb

Defined Under Namespace

Classes: SourceGet

Constant Summary collapse

DOC =
"Usage:\n  __PROGRAM__ [options] __SUBCOMMANDS__\n  __PROGRAM__ -h | --help\n\n  Options:\n    -h --help                        Show this screen\n    -H --host=<host>                 Host Oracle (Ex.: 172.16.3.3)\n    -p --port=<port>                 Porta Oracle (Ex.: 1521) (Padr\u00E3o: 1521).\n    -s --service-name=<service>      Servi\u00E7o Oracle (Ex.: trf1.trf1.gov.br)\n    -u --user=<user>                 Usu\u00E1rio Oracle\n    -w --password=<password>         Senha Oracle\n"

Instance Method Summary collapse

Instance Method Details

#connectionObject



27
28
29
# File 'lib/avmtrf1/tools/runner/oracle.rb', line 27

def connection
  @connection ||= ::Avmtrf1::Oracle::Connection::Base.new(connection_string)
end

#connection_stringObject



31
32
33
34
35
36
37
38
39
# File 'lib/avmtrf1/tools/runner/oracle.rb', line 31

def connection_string
  ::Avmtrf1::Oracle::Connection::StringBuilder.new(
    host: options['--host'],
    port: options['--port'],
    user: options['--user'],
    password: options['--password'],
    service_name: options['--service-name']
  ).build
end