Module: Ident::Response

Defined in:
lib/ident.rb

Defined Under Namespace

Classes: BasicResponse, ERROR, USERID

Class Method Summary collapse

Class Method Details

.from(s) ⇒ Object

Returns an instance of USERID or ERROR, depending on the type of reply.



73
74
75
76
77
# File 'lib/ident.rb', line 73

def self.from(s)
  ports, type, *addinfo = s.split(':')
  klass = self.const_get(type.to_sym)
  klass.new(*addinfo)
end