Class: Chef::ChefFS::FileSystem::ChefServer::OrgEntry

Inherits:
RestListEntry show all
Defined in:
lib/chef/chef_fs/file_system/chef_server/org_entry.rb

Overview

/organizations/NAME/org.json Represents the actual data at /organizations/NAME (the full name, etc.)

Instance Attribute Summary

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from RestListEntry

#_read_json, #api_child_name, #api_error_text, #chef_object, #compare_to, #display_name, #environment, #initialize, #minimize_value, #normalize_value, #org, #read, #rest, #write

Methods inherited from BaseFSObject

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

Constructor Details

This class inherits a constructor from Chef::ChefFS::FileSystem::ChefServer::RestListEntry

Instance Method Details

#api_pathObject

/organizations/foo/org.json -> GET /organizations/foo



16
17
18
# File 'lib/chef/chef_fs/file_system/chef_server/org_entry.rb', line 16

def api_path
  parent.api_path
end

#data_handlerObject



11
12
13
# File 'lib/chef/chef_fs/file_system/chef_server/org_entry.rb', line 11

def data_handler
  Chef::ChefFS::DataHandler::OrganizationDataHandler.new
end

#delete(recurse) ⇒ Object



28
29
30
# File 'lib/chef/chef_fs/file_system/chef_server/org_entry.rb', line 28

def delete(recurse)
  raise Chef::ChefFS::FileSystem::OperationNotAllowedError.new(:delete, self)
end

#display_pathObject



20
21
22
# File 'lib/chef/chef_fs/file_system/chef_server/org_entry.rb', line 20

def display_path
  "/org.json"
end

#exists?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/chef/chef_fs/file_system/chef_server/org_entry.rb', line 24

def exists?
  parent.exists?
end