Class: Net::NNTP::Xpat

Inherits:
Request show all
Defined in:
lib/net/nntp/request.rb

Overview

Extension RFC2980

XPAT request.

Instance Method Summary collapse

Methods inherited from Request

#capability, #command, #dotstuff, #msgid_or_range, #range, #valid_response?

Constructor Details

#initialize(field, patterns, range) ⇒ Xpat

  • field is the header field that should be searched

  • patterns is a string or an array of patterns

  • range can be a string or a hash with either the key :msgid or the keys :start and optionally :end to denote a range.



832
833
834
835
836
# File 'lib/net/nntp/request.rb', line 832

def initialize(field, patterns, range)
  patterns = [patterns] unless patterns.is_a?(Array)
  parameters = field << ' ' << msgid_or_range(range) << ' ' << patterns.join(' ')
  super 'XPAT', parameters
end