Class: Net::NNTP::List
Overview
RFC 3977
LIST request.
Valid Response: ListInformationFollows
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Request
#command, #dotstuff, #msgid_or_range, #range, #valid_response?
Constructor Details
#initialize(keyword = nil, rest = {}) ⇒ List
-
keyword
must be nil or one of ACTIVE, ACTIVE.TIMES, DISTRIB.PATS, HEADERS, NEWSGROUPS or OVERVIEW.FMT.
-
rest
can be a string or a hash with either the key :msgid or the keys :start and optionally :end to denote a range.
Example
request = Net::NNTP::List.new request = Net::NNTP::List.new('ACTIVE') request = Net::NNTP::List.new('ACTIVE.TIMES', 'at.*') request = Net::NNTP::List.new('HEADERS', :msgid => '<this.is@invalid>') request = Net::NNTP::List.new('HEADERS', :start => 123, :end => 456)
723
724
725
726
727
728
729
|
# File 'lib/net/nntp/request.rb', line 723
def initialize(keyword=nil, rest={})
Net::NNTP.logger.debug("Keyword: <#{keyword}>")
@keyword = keyword.strip.upcase if keyword
parameters = (@keyword ? @keyword.dup : '')
parameters << ' ' << msgid_or_range(rest)
super 'LIST', parameters
end
|
Instance Attribute Details
#keyword ⇒ Object
Returns the value of attribute keyword.
711
712
713
|
# File 'lib/net/nntp/request.rb', line 711
def keyword
@keyword
end
|
Instance Method Details
#capability ⇒ Object
735
736
737
|
# File 'lib/net/nntp/request.rb', line 735
def capability
'list'
end
|
#valid_responses ⇒ Object