lib/angelo/main.rb in angelo-0.5.0 vs lib/angelo/main.rb in angelo-0.5.1
- old
+ new
@@ -29,13 +29,16 @@
# all bets are off.
if self.to_s == "main"
# We are probably at the top level.
- require "forwardable"
- self.extend Forwardable
@angelo_app = Class.new(Angelo::Base)
- self.def_delegators :@angelo_app, *Angelo::Base::DSL.instance_methods
+
+ class << self
+ require "forwardable"
+ extend Forwardable
+ def_delegators :@angelo_app, *Angelo::Base::DSL.instance_methods
+ end
at_exit do
# Don't run @angelo_app on uncaught exceptions including exit
# being called which raises SystemExit. The rationale being that
# exit means exit, not "run the server".