2013-12-04 02:30:59 +00:00
|
|
|
shared_context "synced folder actions" do
|
|
|
|
# This creates a synced folder implementation.
|
|
|
|
def impl(usable, name)
|
|
|
|
Class.new(Vagrant.plugin("2", :synced_folder)) do
|
|
|
|
define_method(:name) do
|
|
|
|
name
|
|
|
|
end
|
|
|
|
|
2014-01-11 01:40:29 +00:00
|
|
|
define_method(:usable?) do |machine, raise_error=false|
|
|
|
|
raise "#{name}: usable" if raise_error && !usable
|
2013-12-04 02:30:59 +00:00
|
|
|
usable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|