class Net::TNS::Exceptions::RedirectMessageReceived

Attributes

new_host[R]
new_port[R]

Public Class Methods

new( message ) click to toggle source
Calls superclass method
# File lib/net/tns/exceptions.rb, line 23
def initialize( message )
  super( message )

  host_matches = /\(HOST=([^\)]+)\)/.match( self.message )
  @new_host = host_matches[1] unless host_matches.nil?

  port_matches = /\(PORT=(\d{1,5})\)/.match( self.message )
  @new_port = port_matches[1] unless port_matches.nil?
end