Class: Net::NNTP::ArticleBaseResponse

Inherits:
OKResponse show all
Defined in:
lib/net/nntp/response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#code, #message, #request

Instance Method Summary collapse

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, message, generic=false, multiline=true)
  number, id = message.split(/\s+/)
  @number = number.to_i
  @message_id = id
  super request, code, message, generic, multiline
end

Instance Attribute Details

#message_idObject (readonly)

Returns the value of attribute message_id.



325
326
327
# File 'lib/net/nntp/response.rb', line 325

def message_id
  @message_id
end

#numberObject (readonly)

Returns the value of attribute number.



325
326
327
# File 'lib/net/nntp/response.rb', line 325

def number
  @number
end

#rawObject (readonly)

Returns the value of attribute raw.



325
326
327
# File 'lib/net/nntp/response.rb', line 325

def raw
  @raw
end