Class: Alephant::Broker::Response::Asset

Inherits:
Base
  • Object
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) ⇒ Asset

Returns a new instance of Asset.



9
10
11
12
# File 'lib/alephant/broker/response/asset.rb', line 9

def initialize(component)
  @component = component
  super component.status
end

Instance Method Details

#setupObject



14
15
16
17
18
# File 'lib/alephant/broker/response/asset.rb', line 14

def setup
  @headers.merge!(@component.headers)
  @content  = @component.content
  log if @component.is_a? Component
end