Module: Net::NNTPStatResponseParser

Included in:
NNTPArticleResponse, NNTPBodyResponse, NNTPHeadResponse, NNTPLastResponse, NNTPNextResponse, NNTPStatResponse
Defined in:
lib/net/nntp/response/parsers.rb

Constant Summary collapse

PARSE_RE =
/(\d*)\s(.*)/i

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#article_numInteger (readonly)

Returns the number of the article within the group

Returns:

  • (Integer)

    the number of the article within the group


8
9
10
# File 'lib/net/nntp/response/parsers.rb', line 8

def article_num
  @article_num
end

#message_idString (readonly)

Returns the message id for the article

Returns:

  • (String)

    the message id for the article


10
11
12
# File 'lib/net/nntp/response/parsers.rb', line 10

def message_id
  @message_id
end

Instance Method Details

#parseObject


12
13
14
15
16
# File 'lib/net/nntp/response/parsers.rb', line 12

def parse
  super
  @article_num  = message[PARSE_RE, 1].to_i
  @message_id   = message[PARSE_RE, 2]
end