Sha256: 04b9dba7f81d898c6df4f0b32f4f09c3de8cc7f651fa0daddb4cf1a51133022a

Contents?: true

Size: 520 Bytes

Versions: 7

Compression:

Stored size: 520 Bytes

Contents

# -*- encoding: utf-8 -*-

class Brown::QueueDefinition
	attr_reader :options

	def initialize(name, options)
		@normalised_queue = "smith.#{name}"
		@denormalised_queue = "#{name}"
		@options = options
	end

	def denormalise
		@denormalised_queue
	end

	def name
		@normalised_queue
	end

	def normalise
		@normalised_queue
	end

	# to_a is defined to make the splat operator work.
	def to_a
		return @normalised_queue, @options
	end

	def to_s
		"<#{self.class}: #{@denormalised_queue}, #{@options.inspect}>"
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brown-1.1.2 lib/brown/queue_definition.rb
brown-1.1.1 lib/brown/queue_definition.rb
brown-1.1.0 lib/brown/queue_definition.rb
brown-1.0.3 lib/brown/queue_definition.rb
brown-1.0.2 lib/brown/queue_definition.rb
brown-1.0.1 lib/brown/queue_definition.rb
brown-1.0.0 lib/brown/queue_definition.rb