class Gopher::Response

basic class for server response to a request. contains the rendered results, a code that indicates success/failure, and can report the size of the response

Attributes

body[RW]
code[RW]

Public Instance Methods

size() click to toggle source

get the size, in bytes, of the response. used for logging @return [Integer] size

# File lib/gopher2000/response.rb, line 16
def size
  case self.body
  when String then self.body.length
  when StringIO then self.body.length
  when File then self.body.size
  else 0
  end
end