Class: Net::NNTP::ArticleResponse

Inherits:
ArticleBaseResponse show all
Includes:
BodyBaseResponse
Defined in:
lib/net/nntp/response.rb

Overview

Code: 220

Instance Attribute Summary

Attributes inherited from ArticleBaseResponse

#message_id, #number, #raw

Attributes inherited from Response

#code, #message, #request

Instance Method Summary collapse

Methods included from BodyBaseResponse

#body, #body=

Methods inherited from ArticleBaseResponse

#initialize

Methods inherited from Response

#==, #body, class_from_code, create, #force_close?, #generic?, #has_body?, #initialize, #multiline?, #needs_article?

Constructor Details

This class inherits a constructor from Net::NNTP::ArticleBaseResponse

Instance Method Details

#[](header) ⇒ Object



347
348
349
# File 'lib/net/nntp/response.rb', line 347

def [](header)
  @article[header].to_s
end

#articleObject



344
345
346
# File 'lib/net/nntp/response.rb', line 344

def article
  @article.dup 
end

#parse_bodyObject



337
338
339
340
341
342
343
# File 'lib/net/nntp/response.rb', line 337

def parse_body
  unless @article
    r = @raw.dup
    r.gsub!(/^\./,"")
    @article = TMail::Mail.parse(r) 
  end
end