Class: ChefFS::FileSystem::EnvironmentsDir

Inherits:
RestListDir show all
Defined in:
lib/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.



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

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

Instance Method Details

#_make_child_entry(name, exists = nil) ⇒ Object



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

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