class Circuitry::Queue

Attributes

url[RW]

Public Class Methods

find(name) click to toggle source
# File lib/circuitry/queue.rb, line 29
def self.find(name)
  new(Finder.new(name).find.queue_url)
end
new(url) click to toggle source
# File lib/circuitry/queue.rb, line 25
def initialize(url)
  self.url = url
end

Public Instance Methods

arn() click to toggle source
# File lib/circuitry/queue.rb, line 37
def arn
  @arn ||= attribute('QueueArn')
end
attribute(name) click to toggle source
# File lib/circuitry/queue.rb, line 41
def attribute(name)
  sqs.get_queue_attributes(queue_url: url, attribute_names: [name]).attributes[name]
end
name() click to toggle source
# File lib/circuitry/queue.rb, line 33
def name
  url.split('/').last
end