Class: Rufus::SQS::Queue
- Inherits:
-
Object
- Object
- Rufus::SQS::Queue
- Defined in:
- lib/rufus/sqs.rb
Overview
An SQS queue (gathering all the necessary info about it in a single class).
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#queue_service ⇒ Object
readonly
Returns the value of attribute queue_service.
Instance Method Summary collapse
-
#initialize(queue_service, xml_element) ⇒ Queue
constructor
A new instance of Queue.
Constructor Details
#initialize(queue_service, xml_element) ⇒ Queue
Returns a new instance of Queue.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/rufus/sqs.rb', line 76 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
#host ⇒ Object (readonly)
Returns the value of attribute host.
74 75 76 |
# File 'lib/rufus/sqs.rb', line 74 def host @host end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
74 75 76 |
# File 'lib/rufus/sqs.rb', line 74 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
74 75 76 |
# File 'lib/rufus/sqs.rb', line 74 def path @path end |
#queue_service ⇒ Object (readonly)
Returns the value of attribute queue_service.
74 75 76 |
# File 'lib/rufus/sqs.rb', line 74 def queue_service @queue_service end |