Class: ICAPrb::Server::NullBody

Inherits:
Object
  • Object
show all
Defined in:
lib/icaprb/server/data_structures.rb

Overview

The NullBody is a Class to have an Body without content. It exists to let the ICAP client know, that there will not be any body for this HTTP request. This usually happens when a 204 No Content ist sent.

Instance Method Summary collapse

Instance Method Details

#<=>(_) ⇒ Object

It is always the last entry in ICAP responses.



172
173
174
# File 'lib/icaprb/server/data_structures.rb', line 172

def <=>(_)
  1
end

#inspectObject

Show an empty string on the IRB instead of the object id, so it looks like a ResponseBody



177
178
179
# File 'lib/icaprb/server/data_structures.rb', line 177

def inspect
  '""'
end

#to_sObject

Returns an empty String



167
168
169
# File 'lib/icaprb/server/data_structures.rb', line 167

def to_s
  ''
end