Class: WideReceiver::Config
- Inherits:
-
Object
- Object
- WideReceiver::Config
- Defined in:
- lib/wide_receiver/config.rb
Defined Under Namespace
Classes: NullUri
Instance Attribute Summary collapse
- #message_format ⇒ Object
-
#queue_url ⇒ Object
Returns the value of attribute queue_url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#message_format ⇒ Object
19 20 21 |
# File 'lib/wide_receiver/config.rb', line 19 def @message_format || :raw end |
#queue_url ⇒ Object
Returns the value of attribute queue_url.
8 9 10 |
# File 'lib/wide_receiver/config.rb', line 8 def queue_url @queue_url end |
Class Method Details
.instance ⇒ Object
11 12 13 |
# File 'lib/wide_receiver/config.rb', line 11 def self.instance @instance ||= new end |
.reset! ⇒ Object
15 16 17 |
# File 'lib/wide_receiver/config.rb', line 15 def self.reset! @instance = nil end |
Instance Method Details
#adapter ⇒ Object
23 24 25 |
# File 'lib/wide_receiver/config.rb', line 23 def adapter WideReceiver::Adapters.const_get(queue_uri.scheme.capitalize + 'Adapter') end |
#queue_uri ⇒ Object
27 28 29 |
# File 'lib/wide_receiver/config.rb', line 27 def queue_uri @uri ||= URI.parse(queue_url) rescue NullUri.new('null', nil, nil, nil) end |