module Dpl::ConfigFile::ClassMethods
should this sit in Cl
?
Attributes
config_files[R]
Public Instance Methods
config(*paths)
click to toggle source
# File lib/dpl/helper/config_file.rb, line 13 def config(*paths) if paths.any? @config_files = paths elsif config_files paths = config_files.dup opts = paths.last.is_a?(Hash) ? paths.pop : {} conf = ConfigFiles.new(paths, opts).config known = self.opts.map(&:name).map(&:to_sym) conf.select { |key, _| known.include?(key) } else {} end end