Added spec for Config
[vagrant-dotfiles.git] / lib / copy_my_conf / config.rb
diff --git a/lib/copy_my_conf/config.rb b/lib/copy_my_conf/config.rb
new file mode 100644 (file)
index 0000000..b077607
--- /dev/null
@@ -0,0 +1,20 @@
+module Vagrant
+  module Provisioners
+    class CopyMyConf < Base
+      class Config < Vagrant::Config::Base
+        def self.all_attributes
+          [:ssh, :vim, :git]
+        end
+        attr_accessor *all_attributes
+        attr_accessor :user_home
+
+        def all_true
+          self.class.all_attributes.collect do |attr|
+            self.send(attr) ? attr : nil
+          end.compact
+        end
+      end
+    end
+  end
+end
+