Exception: Net::TNS::Exceptions::RedirectMessageReceived
- Inherits:
-
TNSException
- Object
- StandardError
- TNSException
- Net::TNS::Exceptions::RedirectMessageReceived
- Defined in:
- lib/net/tns/exceptions.rb
Instance Attribute Summary collapse
-
#new_host ⇒ Object
readonly
Returns the value of attribute new_host.
-
#new_port ⇒ Object
readonly
Returns the value of attribute new_port.
Instance Method Summary collapse
-
#initialize(message) ⇒ RedirectMessageReceived
constructor
A new instance of RedirectMessageReceived.
Constructor Details
#initialize(message) ⇒ RedirectMessageReceived
Returns a new instance of RedirectMessageReceived.
23 24 25 26 27 28 29 30 31 |
# File 'lib/net/tns/exceptions.rb', line 23 def initialize( ) super( ) host_matches = /\(HOST=([^\)]+)\)/.match( self. ) @new_host = host_matches[1] unless host_matches.nil? port_matches = /\(PORT=(\d{1,5})\)/.match( self. ) @new_port = port_matches[1] unless port_matches.nil? end |
Instance Attribute Details
#new_host ⇒ Object (readonly)
Returns the value of attribute new_host.
21 22 23 |
# File 'lib/net/tns/exceptions.rb', line 21 def new_host @new_host end |
#new_port ⇒ Object (readonly)
Returns the value of attribute new_port.
20 21 22 |
# File 'lib/net/tns/exceptions.rb', line 20 def new_port @new_port end |