class Yapt::Config
Attributes
project_path[R]
Public Class Methods
new(project_path)
click to toggle source
# File lib/yapt/config.rb, line 6 def initialize(project_path) @project_path = project_path end
Private Instance Methods
config()
click to toggle source
# File lib/yapt/config.rb, line 22 def config @config ||= user_config.merge(project_config) end
load_or_hash(path)
click to toggle source
# File lib/yapt/config.rb, line 18 def load_or_hash(path) YAML.load_file(path) rescue Hash.new end
project_config()
click to toggle source
# File lib/yapt/config.rb, line 26 def project_config load_or_hash("#{project_path}/.yapt") end
user_config()
click to toggle source
# File lib/yapt/config.rb, line 30 def user_config load_or_hash("#{Dir.home}/.yapt") end