Class: Alephant::Broker::Response::Asset
- Inherits:
-
Base
- Object
- Base
- Alephant::Broker::Response::Asset
show all
- Includes:
- Logger
- Defined in:
- lib/alephant/broker/response/asset.rb
Constant Summary
Constants inherited
from Base
Base::STATUS_CODE_MAPPING
Instance Attribute Summary
Attributes inherited from Base
#content, #headers, #status
Instance Method Summary
collapse
Constructor Details
#initialize(component, request_env) ⇒ Asset
9
10
11
12
13
14
15
16
17
|
# File 'lib/alephant/broker/response/asset.rb', line 9
def initialize(component, request_env)
@component = component
@status = self.class.component_not_modified(@component., request_env) ? 304 : component.status
super(@status, component.content_type, request_env)
.merge!(@component.)
end
|
Instance Method Details
#setup ⇒ Object
19
20
21
22
|
# File 'lib/alephant/broker/response/asset.rb', line 19
def setup
@content = @component.content
log if @component.is_a? Component
end
|