Class: Brown::QueueDefinition
- Inherits:
-
Object
- Object
- Brown::QueueDefinition
- Defined in:
- lib/brown/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.
6 7 8 9 10 |
# File 'lib/brown/queue_definition.rb', line 6 def initialize(name, ) @normalised_queue = "smith.#{name}" @denormalised_queue = "#{name}" @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/brown/queue_definition.rb', line 4 def @options end |
Instance Method Details
#denormalise ⇒ Object
12 13 14 |
# File 'lib/brown/queue_definition.rb', line 12 def denormalise @denormalised_queue end |
#name ⇒ Object
16 17 18 |
# File 'lib/brown/queue_definition.rb', line 16 def name @normalised_queue end |
#normalise ⇒ Object
20 21 22 |
# File 'lib/brown/queue_definition.rb', line 20 def normalise @normalised_queue end |
#to_a ⇒ Object
to_a is defined to make the splat operator work.
25 26 27 |
# File 'lib/brown/queue_definition.rb', line 25 def to_a return @normalised_queue, @options end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/brown/queue_definition.rb', line 29 def to_s "<#{self.class}: #{@denormalised_queue}, #{@options.inspect}>" end |