Class: Net::NNTP::Newnews

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

Overview

RFC 3977

NEWNEWS request.

Valid Response: NewnewsResponse

Instance Method Summary collapse

Methods inherited from Request

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

Constructor Details

#initialize(groups, date_str, is_gmt = true) ⇒ Newnews

  • group must be an array of group wildmatches which should be checked for news since date_str.

  • date_str should be a string that will be parsed by DateTime.parse. Do not use system dates, rather use the date given by a Date request or a formerly stored date from a Date request.

  • is_gmt denotes that the given date should be used as GMT (UTC) date (adding the string GMT to the request.) Use if possible.



695
696
697
# File 'lib/net/nntp/request.rb', line 695

def initialize(groups, date_str, is_gmt=true)
  super 'NEWNEWS', groups.join(',') << ' ' << DateTime.parse(date_str, true).strftime('%Y%m%d %H%M%S') << (is_gmt ? ' GMT' : '')
end