Class: Fog::Rackspace::Queues::Message
- Defined in:
- lib/fog/rackspace/models/queues/message.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/fog/rackspace/models/queues/message.rb', line 30 def destroy requires :identity, :queue = {} [:claim_id] = claim_id unless claim_id.nil? service.(queue.name, identity, ) true end |
#identity ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fog/rackspace/models/queues/message.rb', line 14 def identity if href href.split('/').last else nil end end |
#save ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/fog/rackspace/models/queues/message.rb', line 22 def save requires :queue, :client_id, :body, :ttl raise "Message has already been created and may not be updated." unless identity.nil? data = service.(client_id, queue.name, body, ttl).body self.href = data['resources'][0] true end |