Sha256: b62b21ed078dfbb6a0839745d4982a4844ce7fb0e853de742e960e9c64fb4cca

Contents?: true

Size: 422 Bytes

Versions: 2

Compression:

Stored size: 422 Bytes

Contents

require 'chef_fs/file_system/base_fs_object'

module ChefFS
  module FileSystem
    class NonexistentFSObject < BaseFSObject
      def initialize(name, parent)
        super
      end

      def exists?
        false
      end

      def child(name)
        NonexistentFSObject.new(name, self)
      end

      def read
        raise ChefFS::FileSystem::NotFoundException, "Nonexistent object"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
knife-essentials-0.1.1 lib/chef_fs/file_system/nonexistent_fs_object.rb
knife-essentials-0.1 lib/chef_fs/file_system/nonexistent_fs_object.rb