Class: Rundeck::Client

Inherits:
API show all
Includes:
Execution, Job, Key, Project, Token
Defined in:
lib/rundeck/client.rb,
lib/rundeck/client/job.rb,
lib/rundeck/client/key.rb,
lib/rundeck/client/token.rb,
lib/rundeck/client/project.rb,
lib/rundeck/client/execution.rb

Overview

Wrapper for the Rundeck REST API.

Defined Under Namespace

Modules: Execution, Job, Key, Project, Token

Instance Attribute Summary

Attributes inherited from Request

#api_token

Instance Method Summary collapse

Methods included from Token

#create_token, #delete_token, #token, #tokens

Methods included from Project

#create_project, #delete_project, #project, #projects

Methods included from Key

#create_private_key, #create_public_key, #delete_key, #key_contents, #key_metadata, #keys, #update_private_key, #update_public_key

Methods included from Job

#delete_job, #export_jobs, #import_jobs, #job, #jobs

Methods included from Execution

#abort_execution, #bulk_delete_executions, #delete_execution, #delete_job_executions, #execute_job, #execution, #execution_query, #execution_state, #job_executions, #running_job_executions

Methods inherited from API

#initialize

Methods inherited from Request

#delete, #get, #post, #put, #set_request_defaults, #validate

Constructor Details

This class inherits a constructor from Rundeck::API

Instance Method Details

#objectify(result) ⇒ Rundeck::ObjectifiedHash

Note:

This method will objectify nested hashes/arrays.

Turn a hash into an object for easy accessibility.

Raises:



69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rundeck/client.rb', line 69

def objectify(result)
  if result.is_a?(Hash)
    ObjectifiedHash.new(result)
  elsif result.is_a?(Array)
    result.map { |e| ObjectifiedHash.new(e) }
  elsif result.nil?
    nil
  else
    fail Error::Parsing, "Couldn't parse a response body"
  end
end