Class: Net::NNTP::Capabilities
- Inherits:
-
InformationRequest
- Object
- Request
- InformationRequest
- Net::NNTP::Capabilities
- Defined in:
- lib/net/nntp/request.rb
Overview
CAPABILITIES Request. Should be used to discover the commands that the server can process. Can change if MODE or authentication changes the state of the connection. Sadly, most servers do not implement this, leaving either the option to parse the informal response to a HELP request, or use trial-and-error.
Usage Example
nntp = Net::NNTP.new
nntp.server = 'localhost'
nntp.connect
request = Capabilities.new
response = nntp.process(request)
response.capabilities['version'] # returns the version, either as number, or array of numbers, i.e. [2, 3]
Valid Response: CapabilityList
Instance Method Summary collapse
-
#initialize ⇒ Capabilities
constructor
A new instance of Capabilities.
Methods inherited from Request
#capability, #command, #dotstuff, #msgid_or_range, #range, #valid_response?
Constructor Details
#initialize ⇒ Capabilities
Returns a new instance of Capabilities.
195 196 197 |
# File 'lib/net/nntp/request.rb', line 195 def initialize super 'CAPABILITIES' end |