"Fossies" - the Fresh Open Source Software Archive

Member "vagrant-2.2.14/test/unit/support/shared/action_synced_folders_context.rb" (20 Nov 2020, 464 Bytes) of package /linux/misc/vagrant-2.2.14.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "action_synced_folders_context.rb": 2.2.9_vs_2.2.10.

    1 shared_context "synced folder actions" do
    2   # This creates a synced folder implementation.
    3   def impl(usable, name)
    4     Class.new(Vagrant.plugin("2", :synced_folder)) do
    5       define_method(:name) do
    6         name
    7       end
    8 
    9       define_method(:usable?) do |machine, raise_error=false|
   10         raise "#{name}: usable" if raise_error && !usable
   11         usable
   12       end
   13 
   14       define_method(:_initialize) do |machine, type|
   15         true
   16       end
   17     end
   18   end
   19 end