Class: IronMQ::Subscriber
- Inherits:
-
ResponseBase
- Object
- ResponseBase
- IronMQ::Subscriber
- Defined in:
- lib/iron_mq/subscribers.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
‘options` was kept for backward compatibility.
Attributes inherited from ResponseBase
Instance Method Summary collapse
-
#delete(options = {}) ⇒ Object
(also: #acknowledge)
‘options` was kept for backward compatibility.
- #headers ⇒ Object
-
#initialize(data, message, options = {}) ⇒ Subscriber
constructor
A new instance of Subscriber.
- #name ⇒ Object
- #url ⇒ Object
Methods inherited from ResponseBase
Constructor Details
#initialize(data, message, options = {}) ⇒ Subscriber
Returns a new instance of Subscriber.
7 8 9 10 11 |
# File 'lib/iron_mq/subscribers.rb', line 7 def initialize(data, , = {}) super(data, 200) @message = @options = end |
Instance Attribute Details
#options ⇒ Object
‘options` was kept for backward compatibility
5 6 7 |
# File 'lib/iron_mq/subscribers.rb', line 5 def @options end |
Instance Method Details
#delete(options = {}) ⇒ Object Also known as: acknowledge
‘options` was kept for backward compatibility
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/iron_mq/subscribers.rb', line 26 def delete( = {}) @message.call_api_and_parse_response(:delete, path, {subscriber_name: name}) rescue Rest::HttpError => ex #if ex.code == 404 # Rest.logger.info("Delete got 404, safe to ignore.") # # return ResponseBase as normal # ResponseBase.new({"msg" => "Deleted"}, 404) #else raise ex #end end |
#headers ⇒ Object
21 22 23 |
# File 'lib/iron_mq/subscribers.rb', line 21 def headers @raw['headers'] end |
#name ⇒ Object
13 14 15 |
# File 'lib/iron_mq/subscribers.rb', line 13 def name @raw['name'] end |
#url ⇒ Object
17 18 19 |
# File 'lib/iron_mq/subscribers.rb', line 17 def url @raw['url'] end |