Class: IronMQ::Subscriber
- Inherits:
-
ResponseBase
- Object
- ResponseBase
- IronMQ::Subscriber
- Defined in:
- lib/iron_mq/subscribers.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Attributes inherited from ResponseBase
Instance Method Summary collapse
- #delete(options = {}) ⇒ Object
-
#initialize(raw, message, options = {}) ⇒ Subscriber
constructor
A new instance of Subscriber.
Methods inherited from ResponseBase
Constructor Details
#initialize(raw, message, options = {}) ⇒ Subscriber
Returns a new instance of Subscriber.
15 16 17 18 19 |
# File 'lib/iron_mq/subscribers.rb', line 15 def initialize(raw, , ={}) super(raw) @message = @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
13 14 15 |
# File 'lib/iron_mq/subscribers.rb', line 13 def @options end |
Instance Method Details
#delete(options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/iron_mq/subscribers.rb', line 21 def delete(={}) client = @message..client [:subscriber_id] ||= @raw["id"] [:msg_id] ||= @message.id [:project_id] ||= client.project_id [:queue_name] ||= client.queue_name path = Subscribers.path() raw = client.delete(path) res = client.parse_response(raw) return ResponseBase.new(res) end |