Class: AssLauncher::Support::ConnectionString::Http

Inherits:
Object
  • Object
show all
Includes:
AssLauncher::Support::ConnectionString
Defined in:
lib/ass_launcher/support/connection_string.rb

Overview

Note:

All connection string class have methods for get and set values of defined fields. Methods have name as fields but in downcase All fields defined for connection string class retutn #fields

Connection string for infobases published on http server

Constant Summary

Constants included from AssLauncher::Support::ConnectionString

COMMON_FIELDS, DBMS_VALUES, DB_FORMAT_VALUES, DB_PAGE_SIZE_VALUES, FILE_FIELDS, HTTP_FIELDS, HTTP_WEB_AUTH_FIELDS, IB_MAKER_FIELDS, PROXY_FIELDS, SERVER_FIELDS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AssLauncher::Support::ConnectionString

#fields, included, #is, #is?, new, parse, #required_fields, #to_args, #to_cmd, #to_hash, #to_s

Constructor Details

#initialize(hash) ⇒ Http

Returns a new instance of Http.



404
405
406
407
# File 'lib/ass_launcher/support/connection_string.rb', line 404

def initialize(hash)
  fail ConnectionString::Error unless required_fields_received?(hash)
  _set_properties(hash)
end

Class Method Details

.fieldsObject



400
401
402
# File 'lib/ass_launcher/support/connection_string.rb', line 400

def self.fields
  required_fields | COMMON_FIELDS | HTTP_WEB_AUTH_FIELDS | PROXY_FIELDS
end

.required_fieldsObject



396
397
398
# File 'lib/ass_launcher/support/connection_string.rb', line 396

def self.required_fields
  HTTP_FIELDS
end

Instance Method Details

#uriObject



414
415
416
417
418
419
420
421
422
# File 'lib/ass_launcher/support/connection_string.rb', line 414

def uri
  require 'uri'
  uri = URI(ws)
  uri.user = wsn
  uri.password = wsp
  q = uri_query
  uri.query = escape q if q
  uri
end

#ws=(str) ⇒ Object



409
410
411
412
# File 'lib/ass_launcher/support/connection_string.rb', line 409

def ws=(str)
  fail ArgumentError if str.empty?
  @ws = str
end