Class: Net::NNTP::Ihave
- Inherits:
-
PostingRequest
- Object
- Request
- PostingRequest
- Net::NNTP::Ihave
- Defined in:
- lib/net/nntp/request.rb
Overview
IHAVE request.
Valid Responses: TransferOK, TransferArticle, ArticleNotWanted, TransferNotPossible, TransferRejected
Instance Method Summary collapse
- #capability ⇒ Object
-
#initialize(id, body = nil) ⇒ Ihave
constructor
-
id
is the messageid that will be presented to the server.
-
Methods inherited from PostingRequest
Methods inherited from Request
#command, #dotstuff, #msgid_or_range, #range, #valid_response?
Constructor Details
#initialize(id, body = nil) ⇒ Ihave
-
id
is the messageid that will be presented to the server. Will be superficially formally checked -
body
is the posting that should be subsequently posted on a good response (335). It MUST NOT be dot-stuffed.
See also: Post, PostingRequest, TransferOK, TransferArticle, ArticleNotWanted, TransferNotPossible, TransferRejected
622 623 624 625 626 627 |
# File 'lib/net/nntp/request.rb', line 622 def initialize(id, body=nil) raise ParameterError,"Messageid must not be nil!" unless id raise ParameterError,"Malformed messageid" unless id.match(/<.+@.+>/) self.body = body unless body.nil? super "IHAVE", id end |
Instance Method Details
#capability ⇒ Object
634 635 636 |
# File 'lib/net/nntp/request.rb', line 634 def capability 'ihave' end |