Class: Alephant::Broker::ComponentMeta
- Inherits:
-
Object
- Object
- Alephant::Broker::ComponentMeta
- Defined in:
- lib/alephant/broker/component_meta.rb
Instance Attribute Summary collapse
-
#batch_id ⇒ Object
readonly
Returns the value of attribute batch_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#component_key ⇒ Object
NOTE: This is in use in ‘alephant-publisher-queue` also, so if you change this, you’ll need to change this there also.
-
#initialize(id, batch_id, options) ⇒ ComponentMeta
constructor
A new instance of ComponentMeta.
- #key ⇒ Object
- #opts_hash ⇒ Object
Constructor Details
#initialize(id, batch_id, options) ⇒ ComponentMeta
Returns a new instance of ComponentMeta.
6 7 8 9 10 |
# File 'lib/alephant/broker/component_meta.rb', line 6 def initialize(id, batch_id, ) @id = id @batch_id = batch_id @options = convert_keys( || {}) end |
Instance Attribute Details
#batch_id ⇒ Object (readonly)
Returns the value of attribute batch_id.
4 5 6 |
# File 'lib/alephant/broker/component_meta.rb', line 4 def batch_id @batch_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/alephant/broker/component_meta.rb', line 4 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/alephant/broker/component_meta.rb', line 4 def @options end |
Instance Method Details
#component_key ⇒ Object
NOTE: This is in use in ‘alephant-publisher-queue` also, so if you
change this, you'll need to change this there also.
22 23 24 |
# File 'lib/alephant/broker/component_meta.rb', line 22 def component_key "#{id}/#{opts_hash}" end |
#key ⇒ Object
12 13 14 |
# File 'lib/alephant/broker/component_meta.rb', line 12 def key batch_id.nil? ? component_key : renderer_key end |
#opts_hash ⇒ Object
16 17 18 |
# File 'lib/alephant/broker/component_meta.rb', line 16 def opts_hash Crimp.signature end |