Class: Orchestrate::Application::SimpleCacheResponse::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/orchestrate_application/simple_cache_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(header) ⇒ Header

Returns a new instance of Header.



20
21
22
23
24
25
# File 'lib/orchestrate_application/simple_cache_response.rb', line 20

def initialize(header)
  @locations = header[:locations]
  @code, @status = header[:code], header[:status]
  @etag = header[:etag]
  @content = {}
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



18
19
20
# File 'lib/orchestrate_application/simple_cache_response.rb', line 18

def code
  @code
end

#contentObject (readonly)

Returns the value of attribute content.



18
19
20
# File 'lib/orchestrate_application/simple_cache_response.rb', line 18

def content
  @content
end

#etagObject (readonly)

Returns the value of attribute etag.



18
19
20
# File 'lib/orchestrate_application/simple_cache_response.rb', line 18

def etag
  @etag
end

#locationsObject (readonly)

Returns the value of attribute locations.



18
19
20
# File 'lib/orchestrate_application/simple_cache_response.rb', line 18

def locations
  @locations
end

#statusObject (readonly)

Returns the value of attribute status.



18
19
20
# File 'lib/orchestrate_application/simple_cache_response.rb', line 18

def status
  @status
end

Instance Method Details

#locationObject



27
28
29
# File 'lib/orchestrate_application/simple_cache_response.rb', line 27

def location
  locations.first
end