Class: Net::NNTP::Hdr

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

Overview

RFC 3977

HDR request.

Valid Responses: HdrResponse, NoGroupSelected, InvalidArticle, InvalidNumberOrRange, NoSuchMessageid

Instance Method Summary collapse

Methods inherited from Request

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

Constructor Details

#initialize(field, range = nil) ⇒ Hdr

  • field is the header field that should be retrieved

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



771
772
773
774
775
# File 'lib/net/nntp/request.rb', line 771

def initialize(field, range=nil)
  params = field
  params << ' ' << msgid_or_range(range) if range
  super 'HDR', params
end

Instance Method Details

#capabilityObject



782
783
784
# File 'lib/net/nntp/request.rb', line 782

def capability
  'hdr'
end