Class: Zold::HttpResponse

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/zold/http.rb

Overview

Some clients waits for status method in response

Direct Known Subclasses

HttpError

Instance Method Summary collapse

Instance Method Details

#statusObject



37
38
39
# File 'lib/zold/http.rb', line 37

def status
  code.zero? ? 599 : code
end

#status_lineObject



41
42
43
# File 'lib/zold/http.rb', line 41

def status_line
  status_message || ''
end

#to_sObject



45
46
47
# File 'lib/zold/http.rb', line 45

def to_s
  "#{status}: #{status_line}\n#{body}"
end