23f150e999dba0b9ef74edf11bdf36d7a7833f0d
3 class CopyMyConf
< Base
4 class Config
< Vagrant
::Config::Base
5 def self.all_attributes
8 attr_accessor
:user_home
10 all_attributes
.each
do |attr
|
11 define_method(attr
) do
12 instance_variable_get_or_set(attr
, CopyMyConf
.const_get("#{attr.capitalize}").new
)
16 def all_enabled_attributes
17 all_attributes
.collect
do |attr
|
18 instance_variable_get
"@#{attr}"
20 [@ssh, @vim, @git].compact
25 self.class.all_attributes
28 def instance_variable_get_or_set(attr
, value
)
29 instance_variable_get("@#{attr}") || instance_variable_set("@#{attr}", value
)