class Scale::Endpoints::Tasks::ListTasks

Public Class Methods

shortcut() click to toggle source
# File lib/scale/endpoints/tasks/list_tasks.rb, line 10
def self.shortcut
  'tasks'
end

Public Instance Methods

process() click to toggle source
# File lib/scale/endpoints/tasks/list_tasks.rb, line 5
def process
  response = api.request :get, path
  build_tasks response
end

Protected Instance Methods

build_tasks(response) click to toggle source
# File lib/scale/endpoints/tasks/list_tasks.rb, line 20
def build_tasks(response)
  response = parse response
  Resources::Tasks.new response['docs'].map { |obj| build_task obj }, response
end
path() click to toggle source
# File lib/scale/endpoints/tasks/list_tasks.rb, line 16
def path
  'tasks'
end