Class: Ident::Response::ERROR
- Inherits:
-
BasicResponse
- Object
- BasicResponse
- Ident::Response::ERROR
- Defined in:
- lib/ident.rb
Overview
This class gives access to the error returned by an identd. It defines method for every possible kind of error: invalid_port? no_user? hidden_user? unknown_error?
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#hidden_user? ⇒ Boolean
Does the identd hide information from us?.
-
#initialize(type) ⇒ ERROR
constructor
A new instance of ERROR.
-
#invalid_port? ⇒ Boolean
Did we specify an invalid port?.
-
#no_user? ⇒ Boolean
Is no user known for the given connection specification?.
-
#unknown_error? ⇒ Boolean
Did an unknown error occur?.
Methods inherited from BasicResponse
Constructor Details
#initialize(type) ⇒ ERROR
Returns a new instance of ERROR.
55 56 57 |
# File 'lib/ident.rb', line 55 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
54 55 56 |
# File 'lib/ident.rb', line 54 def type @type end |
Instance Method Details
#error? ⇒ Boolean
60 |
# File 'lib/ident.rb', line 60 def error?; true; end |
#hidden_user? ⇒ Boolean
Does the identd hide information from us?
66 |
# File 'lib/ident.rb', line 66 def hidden_user?; @type == "HIDDEN-USER"; end |
#invalid_port? ⇒ Boolean
Did we specify an invalid port?
62 |
# File 'lib/ident.rb', line 62 def invalid_port?; @type == "INVALID-PORT"; end |
#no_user? ⇒ Boolean
Is no user known for the given connection specification?
64 |
# File 'lib/ident.rb', line 64 def no_user?; @type == "NO-USER"; end |
#unknown_error? ⇒ Boolean
Did an unknown error occur?
68 |
# File 'lib/ident.rb', line 68 def unknown_error?; @type == "UNKNOWN-ERROR"; end |