Class: Chef::ChefFS::FileSystem::EnvironmentsDir

Inherits:
RestListDir show all
Defined in:
lib/chef/chef_fs/file_system/environments_dir.rb

Defined Under Namespace

Classes: DefaultEnvironmentEntry

Instance Attribute Summary

Attributes inherited from RestListDir

#api_path, #data_handler

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from RestListDir

#can_have_child?, #child, #children, #create_child, #environment, #org, #rest

Methods inherited from BaseFSDir

#can_have_child?, #child, #dir?

Methods inherited from BaseFSObject

#can_have_child?, #chef_object, #child, #children, #compare_to, #create_child, #delete, #dir?, #exists?, #path_for_printing, #read, #root, #write

Constructor Details

#initialize(parent) ⇒ EnvironmentsDir

Returns a new instance of EnvironmentsDir.



29
30
31
# File 'lib/chef/chef_fs/file_system/environments_dir.rb', line 29

def initialize(parent)
  super("environments", parent, nil, Chef::ChefFS::DataHandler::EnvironmentDataHandler.new)
end

Instance Method Details

#_make_child_entry(name, exists = nil) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/chef/chef_fs/file_system/environments_dir.rb', line 33

def _make_child_entry(name, exists = nil)
  if name == '_default.json'
    DefaultEnvironmentEntry.new(name, self, exists)
  else
    super
  end
end