Parent

Methods

Files

Class/Module Index [+]

Quicksearch

Chef::ChefFS::FileSystem::NodesDir

Public Class Methods

new(parent) click to toggle source
# File lib/chef/chef_fs/file_system/nodes_dir.rb, line 27
def initialize(parent)
  super("nodes", parent)
end

Public Instance Methods

children() click to toggle source

Override children to respond to environment

# File lib/chef/chef_fs/file_system/nodes_dir.rb, line 32
  def children
    @children ||= begin
      env_api_path = environment ? "environments/#{environment}/#{api_path}" : api_path
      rest.get_rest(env_api_path).keys.map { |key| RestListEntry.new("#{key}.json", self, true) }
    rescue Net::HTTPServerException
      if $!.response.code == "404"
        raise Chef::ChefFS::FileSystem::NotFoundError.new($!), "#{path_for_printing} not found"
      else
        raise
      end
    end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.