module Anvil::Config::ClassMethods
Configuration initialization
Public Instance Methods
base_config_path()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 17 def base_config_path "#{base_path}/config.rb" end
base_path()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 9 def base_path File.expand_path('~/.anvil') end
base_projects_path()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 21 def base_projects_path "#{base_path}/projects" end
base_tasks_path()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 13 def base_tasks_path "#{base_path}/tasks" end
init()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 25 def init init_base_path init_config end
Protected Instance Methods
init_base_path()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 32 def init_base_path FileUtils.mkdir_p(base_path) FileUtils.mkdir_p(base_tasks_path) FileUtils.mkdir_p(base_projects_path) FileUtils.touch(base_config_path) unless File.exist?(base_config_path) end
init_config()
click to toggle source
# File lib/anvil/config/class_methods.rb, line 39 def init_config from_file base_config_path end