Class: Fog::Rackspace::Queues::Claims
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::Rackspace::Queues::Claims
- Defined in:
- lib/fog/rackspace/models/queues/claims.rb
Instance Attribute Summary collapse
-
#queue ⇒ Object
Returns the value of attribute queue.
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
#clear, #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
#queue ⇒ Object
Returns the value of attribute queue.
11 12 13 |
# File 'lib/fog/rackspace/models/queues/claims.rb', line 11 def queue @queue end |
Instance Method Details
#all ⇒ Object
13 14 15 |
# File 'lib/fog/rackspace/models/queues/claims.rb', line 13 def all self end |
#create(attributes = {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/fog/rackspace/models/queues/claims.rb', line 17 def create(attributes = {}) object = new(attributes) if object.save object else false end end |
#get(claim_id) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/fog/rackspace/models/queues/claims.rb', line 26 def get(claim_id) requires :queue data = service.get_claim(queue.identity, claim_id).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 |