Class: Net::NNTP::ArticleBaseResponse
- Inherits:
-
OKResponse
- Object
- Response
- OKResponse
- Net::NNTP::ArticleBaseResponse
- Defined in:
- lib/net/nntp/response.rb
Direct Known Subclasses
ArticleResponse, ArticleSelected, BodyResponse, HdrResponse, HeaderResponse, NewnewsResponse, OverviewInformation
Instance Attribute Summary collapse
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(request, code, message, generic = false, multiline = true) ⇒ ArticleBaseResponse
constructor
A new instance of ArticleBaseResponse.
Methods inherited from Response
#==, #body, class_from_code, create, #force_close?, #generic?, #has_body?, #multiline?, #needs_article?
Constructor Details
#initialize(request, code, message, generic = false, multiline = true) ⇒ ArticleBaseResponse
Returns a new instance of ArticleBaseResponse.
326 327 328 329 330 331 |
# File 'lib/net/nntp/response.rb', line 326 def initialize(request, code, , generic=false, multiline=true) number, id = .split(/\s+/) @number = number.to_i @message_id = id super request, code, , generic, multiline end |
Instance Attribute Details
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
325 326 327 |
# File 'lib/net/nntp/response.rb', line 325 def @message_id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
325 326 327 |
# File 'lib/net/nntp/response.rb', line 325 def number @number end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
325 326 327 |
# File 'lib/net/nntp/response.rb', line 325 def raw @raw end |