Module: Net::NNTPGroupResponseParser

Included in:
NNTPGroupResponse, NNTPListGroupResponse
Defined in:
lib/net/nntp/response/parsers.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#groupString (readonly)


33
34
35
# File 'lib/net/nntp/response/parsers.rb', line 33

def group
  @group
end

#highInteger (readonly)


39
40
41
# File 'lib/net/nntp/response/parsers.rb', line 39

def high
  @high
end

#lowInteger (readonly)


37
38
39
# File 'lib/net/nntp/response/parsers.rb', line 37

def low
  @low
end

#num_articlesInteger (readonly)


35
36
37
# File 'lib/net/nntp/response/parsers.rb', line 35

def num_articles
  @num_articles
end

Instance Method Details

#parseObject


41
42
43
44
45
46
47
# File 'lib/net/nntp/response/parsers.rb', line 41

def parse
  super
  @num_articles = message[PARSE_RE, 1].to_i
  @low          = message[PARSE_RE, 2].to_i
  @high         = message[PARSE_RE, 3].to_i
  @group        = message[PARSE_RE, 4]
end