Class: LSQS::Actions::Base
- Inherits:
-
Object
- Object
- LSQS::Actions::Base
- Defined in:
- lib/lsqs/actions/base.rb
Direct Known Subclasses
ChangeMessageVisibility, CreateQueue, DeleteMessage, DeleteMessageBatch, DeleteQueue, GetQueueUrl, ListQueues, PurgeQueue, ReceiveMessage, SendMessage, SendMessageBatch
Instance Attribute Summary collapse
-
#builder ⇒ Builder::XmlMarkup
readonly
Initializes a XML builder.
-
#queue_list ⇒ Object
Returns the value of attribute queue_list.
Instance Method Summary collapse
- #build_url(base_url, queue_name) ⇒ String
-
#initialize(queue_list) ⇒ Base
constructor
A new instance of Base.
-
#name ⇒ String
Returns the name of the class without namespacing.
-
#to_xml ⇒ String
Outputs XML from the builder as a string.
Constructor Details
#initialize(queue_list) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/lsqs/actions/base.rb', line 7 def initialize(queue_list) @queue_list = queue_list end |
Instance Attribute Details
#builder ⇒ Builder::XmlMarkup (readonly)
Initializes a XML builder.
25 26 27 |
# File 'lib/lsqs/actions/base.rb', line 25 def builder @builder end |
#queue_list ⇒ Object
Returns the value of attribute queue_list.
4 5 6 |
# File 'lib/lsqs/actions/base.rb', line 4 def queue_list @queue_list end |
Instance Method Details
#build_url(base_url, queue_name) ⇒ String
46 47 48 |
# File 'lib/lsqs/actions/base.rb', line 46 def build_url(base_url, queue_name) return "#{base_url}/#{queue_name}" end |
#name ⇒ String
Returns the name of the class without namespacing.
16 17 18 |
# File 'lib/lsqs/actions/base.rb', line 16 def name return self.class.name.split('::').last end |
#to_xml ⇒ String
Outputs XML from the builder as a string.
34 35 36 |
# File 'lib/lsqs/actions/base.rb', line 34 def to_xml builder.target! end |