Class: Smith::QueueDefinition
- Inherits:
-
Object
- Object
- Smith::QueueDefinition
- Defined in:
- lib/smith/messaging/queue_definition.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #denormalise ⇒ Object
-
#initialize(name, options) ⇒ QueueDefinition
constructor
A new instance of QueueDefinition.
- #name ⇒ Object
- #normalise ⇒ Object
-
#to_a ⇒ Object
to_a is defined to make the splat operator work.
- #to_s ⇒ Object
Constructor Details
#initialize(name, options) ⇒ QueueDefinition
Returns a new instance of QueueDefinition.
8 9 10 11 12 |
# File 'lib/smith/messaging/queue_definition.rb', line 8 def initialize(name, ) @normalised_queue = "#{Smith.config.smith.namespace}.#{name}" @denormalised_queue = "#{name}" @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/smith/messaging/queue_definition.rb', line 6 def @options end |
Instance Method Details
#denormalise ⇒ Object
14 15 16 |
# File 'lib/smith/messaging/queue_definition.rb', line 14 def denormalise @denormalised_queue end |
#name ⇒ Object
18 19 20 |
# File 'lib/smith/messaging/queue_definition.rb', line 18 def name @normalised_queue end |
#normalise ⇒ Object
22 23 24 |
# File 'lib/smith/messaging/queue_definition.rb', line 22 def normalise @normalised_queue end |
#to_a ⇒ Object
to_a is defined to make the splat operator work.
27 28 29 |
# File 'lib/smith/messaging/queue_definition.rb', line 27 def to_a return @normalised_queue, @options end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/smith/messaging/queue_definition.rb', line 31 def to_s "<#{self.class}: #{@denormalised_queue}, #{@options.inspect}>" end |