Class: Marathon::Queues

Inherits:
Object
  • Object
show all
Defined in:
lib/marathon/queue.rb

Overview

This class represents the Queue with all its elements

Instance Method Summary collapse

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

#listObject

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