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 collapse

Attributes inherited from Base

#content, #content_type, #status

Instance Method Summary collapse

Constructor Details

#initialize(component) ⇒ Asset

Returns a new instance of Asset.



12
13
14
15
# File 'lib/alephant/broker/response/asset.rb', line 12

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

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



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

def component
  @component
end

Instance Method Details

#setupObject



17
18
19
20
21
22
# File 'lib/alephant/broker/response/asset.rb', line 17

def setup
  result  = load(component)

  @status  = result['status']
  @content = result['body']
end