Class: Beetle::Client::Configurator
- Inherits:
-
Object
- Object
- Beetle::Client::Configurator
- Defined in:
- lib/beetle/client.rb
Overview
:nodoc:all
Instance Method Summary collapse
-
#binding(*args, &block) ⇒ Object
need to override binding explicitely.
-
#initialize(client, options = {}) ⇒ Configurator
constructor
A new instance of Configurator.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(client, options = {}) ⇒ Configurator
Returns a new instance of Configurator.
360 361 362 363 |
# File 'lib/beetle/client.rb', line 360 def initialize(client, ={}) @client = client @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
364 365 366 367 368 |
# File 'lib/beetle/client.rb', line 364 def method_missing(method, *args, &block) super unless %w(exchange queue binding message handler).include?(method.to_s) = @options.merge(args.last.is_a?(Hash) ? args.pop : {}) @client.send("register_#{method}", *(args+[]), &block) end |
Instance Method Details
#binding(*args, &block) ⇒ Object
need to override binding explicitely
370 371 372 |
# File 'lib/beetle/client.rb', line 370 def binding(*args, &block) method_missing(:binding, *args, &block) end |