Module: Net::NNTPDateResponseParser

Included in:
NNTPDateResponse
Defined in:
lib/net/nntp/response/parsers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateDateTime (readonly)

Returns the current server time

Returns:

  • (DateTime)

    the current server time


21
22
23
# File 'lib/net/nntp/response/parsers.rb', line 21

def date
  @date
end

Instance Method Details

#parseObject


23
24
25
26
# File 'lib/net/nntp/response/parsers.rb', line 23

def parse
  super
  @date = DateTime.strptime(@message, '%Y%m%d%H%M%S')
end