lib/vagrant/plugin/v2/plugin.rb in vagrant-unbundled-2.2.9.0 vs lib/vagrant/plugin/v2/plugin.rb in vagrant-unbundled-2.2.10.0
- old
+ new
@@ -245,9 +245,21 @@
end
nil
end
+ # Defines a capability for the given synced folder. The block should return
+ # a class/module that has a method with the capability name, ready
+ # to be executed. This means that if it is an instance method,
+ # the block should return an instance of the class.
+ #
+ # @param [String] synced_folder The name of the synced folder
+ # @param [String] cap The name of the capability
+ def self.synced_folder_capability(synced_folder, cap, &block)
+ components.synced_folder_capabilities[synced_folder.to_sym].register(cap.to_sym, &block)
+ nil
+ end
+
# Returns the internal data associated with this plugin. This
# should NOT be called by the general public.
#
# @return [Hash]
def self.data