Class: Fog::Rackspace::Queues::Messages
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::Rackspace::Queues::Messages
- Defined in:
- lib/fog/rackspace/models/queues/messages.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#echo ⇒ Object
Returns the value of attribute echo.
-
#include_claimed ⇒ Object
Returns the value of attribute include_claimed.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#marker ⇒ Object
Returns the value of attribute marker.
-
#queue ⇒ Object
Returns the value of attribute queue.
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
11 12 13 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 11 def client_id @client_id end |
#echo ⇒ Object
Returns the value of attribute echo.
13 14 15 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 13 def echo @echo end |
#include_claimed ⇒ Object
Returns the value of attribute include_claimed.
16 17 18 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 16 def include_claimed @include_claimed end |
#limit ⇒ Object
Returns the value of attribute limit.
14 15 16 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 14 def limit @limit end |
#marker ⇒ Object
Returns the value of attribute marker.
15 16 17 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 15 def marker @marker end |
#queue ⇒ Object
Returns the value of attribute queue.
12 13 14 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 12 def queue @queue end |
Instance Method Details
#all ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 18 def all requires :client_id, :queue response = service.(client_id, queue.name, ) if response.status == 204 data = [] else data = response.body['messages'] end load(data) end |
#get(message_id) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fog/rackspace/models/queues/messages.rb', line 29 def get() requires :client_id, :queue data = service.(client_id, queue.name, ).body new(data) rescue Fog::Rackspace::Queues::NotFound nil # HACK - This has been escalated to the Rackspace Queues team, as this # behavior is not normal HTTP behavior. rescue Fog::Rackspace::Queues::ServiceError nil end |