Class: SQS::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/openwfe/extras/util/sqs.rb

Overview

An SQS queue (gathering all the necessary info about it in a single class).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue_service, xml_element) ⇒ Queue

Returns a new instance of Queue.



82
83
84
85
86
87
88
89
90
91
# File 'lib/openwfe/extras/util/sqs.rb', line 82

def initialize (queue_service, xml_element)

    @queue_service = queue_service

    s = xml_element.text.to_s
    m = Regexp.compile('^http://(.*)(/.*)(/.*$)').match(s)
    @host = m[1]
    @name = m[3][1..-1]
    @path = m[2] + m[3]
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



80
81
82
# File 'lib/openwfe/extras/util/sqs.rb', line 80

def host
  @host
end

#nameObject (readonly)

Returns the value of attribute name.



80
81
82
# File 'lib/openwfe/extras/util/sqs.rb', line 80

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



80
81
82
# File 'lib/openwfe/extras/util/sqs.rb', line 80

def path
  @path
end

#queue_serviceObject (readonly)

Returns the value of attribute queue_service.



80
81
82
# File 'lib/openwfe/extras/util/sqs.rb', line 80

def queue_service
  @queue_service
end