Class: Marathon::Queues
- Inherits:
-
Object
- Object
- Marathon::Queues
- Defined in:
- lib/marathon/queue.rb
Overview
This class represents the Queue with all its elements
Instance Method Summary collapse
-
#initialize(connection) ⇒ Queues
constructor
A new instance of Queues.
-
#list ⇒ Object
Show content of the task queue.
Constructor Details
#initialize(connection) ⇒ Queues
Returns a new instance of Queues.
30 31 32 |
# File 'lib/marathon/queue.rb', line 30 def initialize(connection) @connection = connection end |
Instance Method Details
#list ⇒ Object
Show content of the task queue. Returns Array of Queue objects.
36 37 38 39 |
# File 'lib/marathon/queue.rb', line 36 def list json = @connection.get('/v2/queue')['queue'] json.map { |j| Marathon::Queue.new(j) } end |