Method: Brief::Server::Gateway#load_briefcases

Defined in:
lib/brief/server/gateway.rb

#load_briefcasesObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/brief/server/gateway.rb', line 15

def load_briefcases
  config_path = briefcase_options.fetch(:config_path, "brief.rb")

  root.children.select(&:directory?).each do |dir|
    if dir.join(config_path).exist?
      slug = dir.basename.to_s.parameterize
      @briefcases[slug] ||= Brief::Briefcase.new(briefcase_options.merge(root: dir))
    end
  end
end