Class: Queuel::Client
- Inherits:
-
Object
- Object
- Queuel::Client
- Defined in:
- lib/queuel/client.rb
Instance Method Summary collapse
-
#initialize(engine, credentials, init_queue = nil) ⇒ Client
constructor
A new instance of Client.
- #queue ⇒ Object
- #with(change_queue = nil) ⇒ Object
Constructor Details
#initialize(engine, credentials, init_queue = nil) ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 |
# File 'lib/queuel/client.rb', line 4 def initialize(engine, credentials, init_queue = nil) self.engine = engine self.credentials = credentials self.given_queue = init_queue end |
Instance Method Details
#queue ⇒ Object
20 21 22 23 |
# File 'lib/queuel/client.rb', line 20 def queue = (given_queue || Queuel.default_queue) .to_s unless .nil? end |
#with(change_queue = nil) ⇒ Object
16 17 18 |
# File 'lib/queuel/client.rb', line 16 def with(change_queue = nil) self.clone.tap { |client| client.given_queue = change_queue } end |