require "pico/string_inflections" require "pico/autoloader" require "pico/context" require "pico/application" require "pico/version" require "ruse" require "pathname" require "pico/ruse_extensions" if defined? Rake require "pico/rake" end module Pico extend self attr :application, :contexts @contexts = {} def define_application(name, **params, &block) contexts[name] = @application = Application.new(name, **params, &block) end def define_context(name, **params) contexts[name] = Context.new(name, **params) end def boot! contexts.each_value(&:boot!) end def shutdown! contexts.each_value do |context| context.shutdown! if context.booted? end contexts.clear end Error = Class.new StandardError Exception = Class.new Error end