Class: Alephant::Broker::Response::Asset
- Includes:
- Logger
- Defined in:
- lib/alephant/broker/response/asset.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(component, request_env) ⇒ Asset
constructor
A new instance of Asset.
- #setup ⇒ Object
Constructor Details
#initialize(component, request_env) ⇒ Asset
Returns a new instance of 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.headers, request_env) ? 304 : component.status super(@status, component.content_type, request_env) @headers.merge!(@component.headers) 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 |