Class: AssLauncher::Support::ConnectionString::Http
- Inherits:
-
Object
- Object
- AssLauncher::Support::ConnectionString::Http
- 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, FILE_FIELDS, HTTP_FIELDS, HTTP_WEB_AUTH_FIELDS, IB_MAKER_FIELDS, PROXY_FIELDS, SERVER_FIELDS
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Http
constructor
A new instance of Http.
- #uri ⇒ Object
- #ws=(str) ⇒ Object
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.
386 387 388 389 |
# File 'lib/ass_launcher/support/connection_string.rb', line 386 def initialize(hash) fail ConnectionString::Error unless required_fields_received?(hash) _set_properties(hash) end |
Class Method Details
.fields ⇒ Object
382 383 384 |
# File 'lib/ass_launcher/support/connection_string.rb', line 382 def self.fields required_fields | COMMON_FIELDS | HTTP_WEB_AUTH_FIELDS | PROXY_FIELDS end |
.required_fields ⇒ Object
378 379 380 |
# File 'lib/ass_launcher/support/connection_string.rb', line 378 def self.required_fields HTTP_FIELDS end |
Instance Method Details
#uri ⇒ Object
396 397 398 399 400 401 402 403 404 |
# File 'lib/ass_launcher/support/connection_string.rb', line 396 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
391 392 393 394 |
# File 'lib/ass_launcher/support/connection_string.rb', line 391 def ws=(str) fail ArgumentError if str.empty? @ws = str end |