Class: Alephant::Broker::Request::Asset
- Inherits:
-
Object
- Object
- Alephant::Broker::Request::Asset
- Includes:
- Logger
- Defined in:
- lib/alephant/broker/request/asset.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
Returns the value of attribute component.
Instance Method Summary collapse
-
#initialize(component_factory, env = nil) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(component_factory, env = nil) ⇒ Asset
Returns a new instance of Asset.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/alephant/broker/request/asset.rb', line 12 def initialize(component_factory, env = nil) return if env.nil? @component = component_factory.create( component_id(env.path), nil, env. ) rescue InvalidAssetId logger.metric "InvalidAssetId" logger.error( method: 'Broker.Request.Asset.initialize', message: 'Exception raised (InvalidAssetId)' ) end |
Instance Attribute Details
#component ⇒ Object
Returns the value of attribute component.
10 11 12 |
# File 'lib/alephant/broker/request/asset.rb', line 10 def component @component end |