Class: Rufus::SQS::Queue

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#hostObject (readonly)

Returns the value of attribute host.



74
75
76
# File 'lib/rufus/sqs.rb', line 74

def host
  @host
end

#nameObject (readonly)

Returns the value of attribute name.



74
75
76
# File 'lib/rufus/sqs.rb', line 74

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



74
75
76
# File 'lib/rufus/sqs.rb', line 74

def path
  @path
end

#queue_serviceObject (readonly)

Returns the value of attribute queue_service.



74
75
76
# File 'lib/rufus/sqs.rb', line 74

def queue_service
  @queue_service
end