Sha256: 4db279f356d726b57c3d929e6f4f5d698fa99108066c7a3b8ddb145665d4886e
Contents?: true
Size: 611 Bytes
Versions: 15
Compression:
Stored size: 611 Bytes
Contents
require 'chef_fs/file_system/rest_list_dir' require 'chef_fs/file_system/cookbook_dir' module ChefFS module FileSystem class CookbooksDir < RestListDir def initialize(parent) super("cookbooks", parent) end def child(name) result = @children.select { |child| child.name == name }.first if @children result || CookbookDir.new(name, self) end def children @children ||= rest.get_rest(api_path).map { |key, value| CookbookDir.new(key, self, value) } end def can_have_child?(name, is_dir) is_dir end end end end
Version data entries
15 entries across 15 versions & 1 rubygems