Class: Net::NNTPArticleResponse

Inherits:
NNTPLongResponse show all
Includes:
NNTPHeaderParser, NNTPStatResponseParser
Defined in:
lib/net/nntp/response/responses.rb

Constant Summary

Constants included from NNTPHeaderParser

Net::NNTPHeaderParser::HEADER_PARSE_RE

Constants included from NNTPStatResponseParser

Net::NNTPStatResponseParser::PARSE_RE

Instance Attribute Summary collapse

Attributes included from NNTPStatResponseParser

#article_num, #message_id

Attributes inherited from NNTPLongResponse

#raw_data

Instance Method Summary collapse

Methods included from NNTPHeaderParser

#parse_headers

Methods included from NNTPStatResponseParser

#parse

Instance Attribute Details

#articleNNTPArticle (readonly)

Returns the selected article

Returns:


79
80
81
# File 'lib/net/nntp/response/responses.rb', line 79

def article
  @article
end

Instance Method Details

#handle_long_response(data) ⇒ Object


85
86
87
88
# File 'lib/net/nntp/response/responses.rb', line 85

def handle_long_response(data)
  super(data)
  @article = Net::NNTPArticle.parse(data)
end

#has_long_response?Boolean

Returns:

  • (Boolean)

81
82
83
# File 'lib/net/nntp/response/responses.rb', line 81

def has_long_response?
  @code == 220
end