Sha256: 2311146b88b0ae84a39a0030746693394ead607c20b073c20115d669d0a1d555
Contents?: true
Size: 847 Bytes
Versions: 8
Compression:
Stored size: 847 Bytes
Contents
require "roda" require "roda/plugins/flow" require "dry-configurable" module Dry module Web module Roda class Application < ::Roda extend Dry::Configurable setting :container, reader: true setting :routes plugin :flow def self.configure(&block) super.tap do use(container[:rack_monitor]) if container.config.listeners end end def self.resolve(name) container[name] end def self.[](name) container[name] end def self.load_routes! Dir[root.join("#{config.routes}/**/*.rb")].each { |f| require f } end def self.root container.config.root end def notifications self.class[:notifications] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems