Class: Gemkeeper::CompactIndexServer::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/gemkeeper/compact_index_server/response.rb

Overview

Outcome of a compact-index request: a not-modified marker (304) or a body+etag (200), or a non-success status. Callers ask, never inspect.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



7
8
9
# File 'lib/gemkeeper/compact_index_server/response.rb', line 7

def body
  @body
end

#etagObject

Returns the value of attribute etag

Returns:

  • (Object)

    the current value of etag



7
8
9
# File 'lib/gemkeeper/compact_index_server/response.rb', line 7

def etag
  @etag
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



7
8
9
# File 'lib/gemkeeper/compact_index_server/response.rb', line 7

def status
  @status
end

Instance Method Details

#not_modified?Boolean

Returns:

  • (Boolean)


8
# File 'lib/gemkeeper/compact_index_server/response.rb', line 8

def not_modified? = status == 304

#success?Boolean

Returns:

  • (Boolean)


9
# File 'lib/gemkeeper/compact_index_server/response.rb', line 9

def success?      = status == 200