Class: VSphereCloud::Resources::Folder

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud/vsphere/resources/folder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, logger, client, datacenter_name) ⇒ Folder

Returns a new instance of Folder.



6
7
8
9
10
11
12
13
14
# File 'lib/cloud/vsphere/resources/folder.rb', line 6

def initialize(path, logger, client, datacenter_name)
  @path = path
  @logger = logger
  @client = client
  @datacenter_name = datacenter_name
  @path_components = path.split('/')

  @mob = find_or_create_folder(@path_components)
end

Instance Attribute Details

#mobObject (readonly)

Returns the value of attribute mob.



4
5
6
# File 'lib/cloud/vsphere/resources/folder.rb', line 4

def mob
  @mob
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/cloud/vsphere/resources/folder.rb', line 4

def path
  @path
end

#path_componentsObject (readonly)

Returns the value of attribute path_components.



4
5
6
# File 'lib/cloud/vsphere/resources/folder.rb', line 4

def path_components
  @path_components
end