Class: Rancher::ManagementApi::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/rancher/management_api/manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conn = nil, host: nil) ⇒ Manager

Returns a new instance of Manager.



6
7
8
# File 'lib/rancher/management_api/manager.rb', line 6

def initialize(conn = nil, host: nil)
  @conn = conn || ManagementApi.connection(host)
end

Instance Attribute Details

#connObject (readonly)

Returns the value of attribute conn.



4
5
6
# File 'lib/rancher/management_api/manager.rb', line 4

def conn
  @conn
end

Instance Method Details

#create_project(name) ⇒ Object



10
11
12
# File 'lib/rancher/management_api/manager.rb', line 10

def create_project(name)
  Project.create(conn, name)
end