Class: Jenkins2::API

Inherits:
Object
  • Object
show all
Includes:
Computer, Credentials, Job, Plugins, RoleStrategy, Root, User, View
Defined in:
lib/jenkins2/api.rb,
lib/jenkins2/api/job.rb,
lib/jenkins2/api/rud.rb,
lib/jenkins2/api/root.rb,
lib/jenkins2/api/user.rb,
lib/jenkins2/api/view.rb,
lib/jenkins2/api/plugins.rb,
lib/jenkins2/api/computer.rb,
lib/jenkins2/api/credentials.rb,
lib/jenkins2/api/role_strategy.rb

Defined Under Namespace

Modules: Computer, Credentials, Job, Plugins, RUD, RoleStrategy, Root, User, View

Constant Summary

Constants included from View

View::MODE_LIST_VIEW

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from View

#view, #views

Methods included from User

#me, #people, #user

Methods included from Root

#cancel_quiet_down, #quiet_down, #restart, #restart!, #root, #version

Methods included from RoleStrategy

#roles

Methods included from Plugins

#plugins

Methods included from Job

#job

Methods included from Computer

#computer

Methods included from Credentials

#credentials

Constructor Details

#initialize(**options) ⇒ API

Returns a new instance of API.



29
30
31
32
33
# File 'lib/jenkins2/api.rb', line 29

def initialize(**options)
	@connection = Jenkins2::Connection.new(options[:server]).
		basic_auth options[:user], options[:key]
	Log.init(log: options[:log], verbose: options[:verbose])
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



27
28
29
# File 'lib/jenkins2/api.rb', line 27

def connection
  @connection
end